Author Topic: Calibration and align batch operations  (Read 178757 times)

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: Calibration and align batch operations
« Reply #45 on: 2012 February 05 19:19:30 »
Just did a test on my OSX 64bit again.  Selected individual frames for bias, darks, and lights.  Didn't have any flats.

The script went through the master bias and dark creation ok it seems, created a /masterframes folder in the root dir of my hard drive and in there it saved masterbias_binning_1.fit and masterdark_binning_1_exptime_1800.fit.  All seemed good, although not too keen on this folder in root of hard disk, would prefer somewhere else.  Assume that is configurable somewhere, still getting used to things.

But it seems when the script started trying to calibrate the lights, I got this error message:

Quote
Writing file:
/masterframes/masterdark_binning_1_exptime_1800.fit
Writing FITS image: 32-bit floating point, 1 channel(s), 3326x2504 pixels: 100%
searching for master dark frame with 240s - available master dark frame with 0s
*** Error [000]: /Users/troy/Applications/pixinsight/CalibrateAlign-007b.js, line 479: Error: <p><b>ImageCalibration</b></p><p style="white-space:pre;">Couldn't execute this instance in the global context.</p><p>Reason: Missing or invalid master dark frame.</p>

Note also that the html tags were there in the console window too.

Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
Re: Calibration and align batch operations
« Reply #46 on: 2012 February 06 01:24:23 »
Unfortunately I cannot test on MacOS - currently I am cleaning up the code, so I hope that the problems will be rexolved.

There is an error in 0.0.7b when using darks with an EXPTIME longer than 1000s - this was adressed by Mike a few days ago. The next version will fix this.

Kai


Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
Re: Calibration and align batch operations
« Reply #47 on: 2012 February 09 11:06:00 »
Attached is 0.0.7d - after code clean up and minor enhancements to the user interface.

The script needs FITS input with proper keywords (IMAGETYP, XBINNING, EXPTIME, FILTER) to group calibration and light frames. I have tested
this with FITS frames aquired with MaximDL.

Kai


Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: Calibration and align batch operations
« Reply #48 on: 2012 February 09 15:31:24 »
Still having the issue of master frames not being accepted on OSX64 here.

Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
Re: Calibration and align batch operations
« Reply #49 on: 2012 February 09 23:13:36 »
can you please give me an example data set?

Kai


Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: Calibration and align batch operations
« Reply #50 on: 2012 February 10 07:47:17 »
Did you generate the master frames with the current script version?
Some generated with some of the older versions may not work.

Max

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: Calibration and align batch operations
« Reply #51 on: 2012 February 10 20:52:25 »
Kai,

I tried the rotator version you modified for me.  It appears to recognize the rotator degrees and sort the columns fine.

However, when run I get
"  doCalibrate - masterBiasPath: C:/Users/max/Rotator script/masterframes/masterbias_XBINNING_1.fit
*** Error [000]: C:/Kai Script PIX/CalibrateAlign-09022012/CalibrateAlign-engine.js, line 367: Error: Math.max(): invalid array length "


Max



Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
Re: Calibration and align batch operations
« Reply #52 on: 2012 February 11 04:33:13 »
Max,

there is a problem in the getDarkFrame function when the array length of EXPTIMES avalilable is 1. I will try to fix this. Do you apply dark frames with different exposure times?

Kai

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: Calibration and align batch operations
« Reply #53 on: 2012 February 13 23:21:58 »
can you please give me an example data set?

Kai

G'day Kai,

Sorry haven't gotten back to you sooner, haven't had access to the data.  I think that the problem is that my master files were not generated by your script.  I had created them manually before I discovered your script.  So if the script has to have certain FITS headers in the master frames to work, that would be the problem.  Is that the case?

Personally, I don't think it should rely on the FITS keywords.  If someone has chosen to use a master, it could come from anywhere and not necessarily have any keywords.

Did you generate the master frames with the current script version?
Some generated with some of the older versions may not work.

Max

G'day Max,

No, as I mentioned above, I manually created the masters before I discovered Kai's wonderful script.

I might do some testing by creating masters now using the script and trying those.

Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
Re: Calibration and align batch operations
« Reply #54 on: 2012 February 14 00:54:05 »
Hi,

the master frames should be prepared using the script because the FITS keywords are written to these files. But I think your error message shown is caused by a problem in the function getMasterDarkFrame(), when you apply dark frames with one EXPTIME only. I have fixed this in the current version of the script (I will post the fix this evening).

To use (master) files from another source I have posted a small batch script some weeks ago to set FITS keywords/values on a number of files.

Best,

Kai

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: Calibration and align batch operations
« Reply #55 on: 2012 February 14 01:39:17 »
Thanks mate. I did a test of creating masters using your script, then using it as master in the script separately. It did work that way. So your script is certainly requiring something it is adding to the files it creates.

Issues:
- creating the master without applying it to any lights caused problems. Next time tried to run the script, got error message in console about incomplete /tmp/calalign.cfg file. Manually deleted it and script ran fine. Be nice to be able to create masters without having to apply it to lights without error?
- creating master as per above, it gave error message about not being able to find/create /masterframes due to permissions. Maybe don't try to create folders in root, but home dir where you know you have permission? Or better yet, make it a user definable variable?

Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
Re: Calibration and align batch operations
« Reply #56 on: 2012 February 14 02:45:29 »

- delete the cfg-file and rerun the script generating masters only. If there are any errrors please send me the console log.

- you can select the output directory - the out files are then gropued below.  Of course you will need write access there.

Kai


Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
Re: Calibration and align batch operations
« Reply #57 on: 2012 February 14 12:04:36 »
0.0.7e should fix 2 problems when selecting master dark frames (single EXPTIME and exposure of light frames > available master dark)

Kai

Offline oo_void

  • Newcomer
  • Posts: 3
Re: Calibration and align batch operations
« Reply #58 on: 2012 February 14 14:56:50 »
Just tried this script for the first time with no luck ... I get following error when attempting to add flats or lights. 

*** Error [222]: /Users/p139jeb/Library/PixInsight/CalibrateAlign-engine.js, line 89: TypeError: FrameType[group.Imagetype] is undefined

Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
Re: Calibration and align batch operations
« Reply #59 on: 2012 February 15 00:53:17 »
Hi,

camera, software? The script ist splitted in several files that are included at runtime. The global var FrameType is defined in CalibrateAlign-def

Kai