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

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
    • View Profile
Calibration and align batch operations
« on: 2011 December 06 18:40:09 »

Kai has started a nice little script.

http://pixinsight.com/forum/index.php?topic=3638.0

Max

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
    • View Profile
Re: Calibration and align batch operations
« Reply #1 on: 2011 December 15 14:42:00 »
Here the latest version of the script

Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
    • View Profile
Re: Calibration and align batch operations
« Reply #2 on: 2011 December 17 05:43:13 »
this small update prevents from loading duplicate files.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6935
    • View Profile
    • http://pixinsight.com/
Re: Calibration and align batch operations
« Reply #3 on: 2011 December 19 15:40:48 »
Kai, Max,

Please don't think I'm ignoring Kai's excellent work. I am well aware of it (as well as Nikolay's modules, Enzo's script, etc.) and as soon as I can invest the necessary time, I'll review everything you're doing and we'll support these developments as they deserve.

Right now I am extremely busy finishing a new version of the PI Core application (around Qt 4.8) and a new batch of documentation. Thank you for your nice work, please keep it up!
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
    • View Profile
Re: Calibration and align batch operations
« Reply #4 on: 2011 December 21 18:28:34 »
Thanks Juan,
I have using kai's script over a week now it works nicely

Max

Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
    • View Profile
Re: Calibration and align batch operations
« Reply #5 on: 2012 January 02 11:14:01 »
Juan, Max,

thank you for your encouragement!

Some parts of the script were rewritten to use a less complex data structure and there were minor modifications at the GUI part.

Kai

 

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
    • View Profile
Re: Calibration and align batch operations
« Reply #6 on: 2012 January 02 19:30:46 »
Some file selections don't show up in the list of images .
This is true of masters created with the last version.


Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
    • View Profile
Re: Calibration and align batch operations
« Reply #7 on: 2012 January 03 03:24:06 »
Can you please give me some files for testing? My files were aquired using MaximDL and some of my flat files have an IMAGETYP 'Light Frame' set.
The master frames from older versions of the script do not contain the IMAGETYP keyword. The last version of the script uses strict checking of the IMAGETYP key.

If this is the problem you can try the small script attached to set IMAGETYP. The script will not ask before writing to your fits header data - so please don't forget to make a  backup.


Kai


Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
    • View Profile
Re: Calibration and align batch operations
« Reply #8 on: 2012 January 03 16:19:33 »
My fits were made by Maxim Dl too.  The Masters were created by the 6d version

Max

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
    • View Profile
Re: Calibration and align batch operations
« Reply #9 on: 2012 January 03 16:50:00 »
 My wish list for script in future versions

 1  Add integration. Unselect align or integration processes when desired too
 2. Deselect individual fits files from list in addition to clear all
 3. Select the reference image from the image list , double click or default to first file ( easier than set path)
 4. Single image or an image named master in fits key word automatically identified as a master
     No need to check use master
 5.  Persistent setting and paths. They should remain the same next time script is run
 6.  I use a rotator so matching the fits key rotator ' xxx.xx  ' position in degrees between flats and lights would be vary helpful. ( in addition to filter)

this just my 2 cents

Max



Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
    • View Profile
Re: Calibration and align batch operations
« Reply #10 on: 2012 January 03 16:53:01 »
Kai, Max,

Please don't think I'm ignoring Kai's excellent work. I am well aware of it (as well as Nikolay's modules, Enzo's script, etc.) and as soon as I can invest the necessary time, I'll review everything you're doing and we'll support these developments as they deserve.

Right now I am extremely busy finishing a new version of the PI Core application (around Qt 4.8) and a new batch of documentation. Thank you for your nice work, please keep it up!

1.74 is done come out and play Juan.

Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
    • View Profile
Re: Calibration and align batch operations
« Reply #11 on: 2012 January 04 04:33:50 »
Max,

the script was initially written as a prototype to better understand the PI process of calibration/alignment and integration. And it is my first try with javascript. There are limitations
of the script language preventing me from adding complex functions to this (mainly lack of a debugger, the limited degree of interactivity with the modal behaviour of the script dialog).

If possible, I would try to port this to a C++ module and then enhance functionality - but if I correctly understand it is up to now not possible to invoke PI modules or their properties/methods from another PCL module ????.


Thank you for your feedback!


 1  Add integration. Unselect align or integration processes when desired too

I can try to add this - the integration control is separated in the script code and it may be possible to add this dynamically for all filter settings to the Light tab.
This was removed from the initial version because I thought about using different sets of integration parameters for well sampled L data and more or less poorly sampled RGB data.

 2. Deselect individual fits files from list in addition to clear all

I have planned to do this - I will need some more information about the TreeBox object in order to give a visual feedback to the user.
 
 3. Select the reference image from the image list , double click or default to first file ( easier than set path)

Hm, I need again more info or code examples for TreeBox.

 4. Single image or an image named master in fits key word automatically identified as a master
     No need to check use master

Yes, I thought about adding a new FITS keyword to the master frames.

 5.  Persistent setting and paths. They should remain the same next time script is run

I need some information about object persistance in PJSR. This should be added with priority.

 6.  I use a rotator so matching the fits key rotator ' xxx.xx  ' position in degrees between flats and lights would be vary helpful. ( in addition to filter)

Unfortunately I have no rotator yet - but I have thought about adding this to my equipment. Of course it is possible to add this to the data when reading the FITS files but I will need
example data.

Best,

Kai

Offline Jack Harvey

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 975
    • View Profile
    • PegasusAstronomy.com & Starshadows.com
Re: Calibration and align batch operations
« Reply #12 on: 2012 January 04 07:31:12 »
This script is very cool!  THe above suggestions are all good ones.  I did have a bit of trouble learning to use the script (no reference docs<G>.)  So I made a short cheat sheet for myself - others may find it helpful?

CalibrateAlign Script Cheat Sheet

1.  Download CalAlign script 6d from PI forum.  Open script editor File>Open and navigate to the   CalAlign script on your computer.  Execute>Compile and Run gives you a window to work with.

2.  Select Bias and load either raw bias frames or bias master (check use master bias if so)

3.  Select Dark and repeat process in step 2

4.  Select Flat and again repeat process in step 2.  Load flats for all the filters you will load in Lights

5.  Select lights and load all the light frames you wish (can load all filters)

6.  Select a registration master for the Reference Image drop down

7.  Select a destination folder for the Output drop down

8.  Press OK and now go get a cup of coffee or a glass of wine<G>.  The script will output
     the calibrated and registered light frames in the output folder in subfolders for each filter.
« Last Edit: 2012 January 04 07:55:24 by Jack Harvey »
Jack Harvey, PTeam Member
Team Leader, SSRO/PROMPT Imaging Team, CTIO

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
    • View Profile
Re: Calibration and align batch operations
« Reply #13 on: 2012 January 04 10:48:59 »
No hurry,

Progressing nicely.   Hopefully, we can get some of the other actual programers to give it a try.
Perhaps they can suggest some code.  This is very useful script.

A few more on the wish list.
Handle color camera images.

Images that don't contain the key words. Most of us use MaxIm and other programs that contain the standard Fits key words for time, bin, and filter.  However, there will be a few with the odd acquistion program that does not put these in.

Low priorty options, ie, bells and whistles.
Dark flat option or scaling darks for longer duration flats.

Add cosmetic correction module to script. It can be helpful to remove fixed hot columns and pixels after calibration. 
I need less sigma rejection when I do this for my hot columns.

Max

Max,

the script was initially written as a prototype to better understand the PI process of calibration/alignment and integration. And it is my first try with javascript. There are limitations
of the script language preventing me from adding complex functions to this (mainly lack of a debugger, the limited degree of interactivity with the modal behaviour of the script dialog).

If possible, I would try to port this to a C++ module and then enhance functionality - but if I correctly understand it is up to now not possible to invoke PI modules or their properties/methods from another PCL module ????.


Thank you for your feedback!


 1  Add integration. Unselect align or integration processes when desired too

I can try to add this - the integration control is separated in the script code and it may be possible to add this dynamically for all filter settings to the Light tab.
This was removed from the initial version because I thought about using different sets of integration parameters for well sampled L data and more or less poorly sampled RGB data.

 2. Deselect individual fits files from list in addition to clear all

I have planned to do this - I will need some more information about the TreeBox object in order to give a visual feedback to the user.
 
 3. Select the reference image from the image list , double click or default to first file ( easier than set path)

Hm, I need again more info or code examples for TreeBox.

 4. Single image or an image named master in fits key word automatically identified as a master
     No need to check use master

Yes, I thought about adding a new FITS keyword to the master frames.

 5.  Persistent setting and paths. They should remain the same next time script is run

I need some information about object persistance in PJSR. This should be added with priority.

 6.  I use a rotator so matching the fits key rotator ' xxx.xx  ' position in degrees between flats and lights would be vary helpful. ( in addition to filter)

Unfortunately I have no rotator yet - but I have thought about adding this to my equipment. Of course it is possible to add this to the data when reading the FITS files but I will need
example data.

Best,

Kai

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
    • View Profile
Re: Calibration and align batch operations
« Reply #14 on: 2012 January 04 10:49:50 »
Thanks for post the instructions Jack.

Max

This script is very cool!  THe above suggestions are all good ones.  I did have a bit of trouble learning to use the script (no reference docs<G>.)  So I made a short cheat sheet for myself - others may find it helpful?

CalibrateAlign Script Cheat Sheet

1.  Download CalAlign script 6d from PI forum.  Open script editor File>Open and navigate to the   CalAlign script on your computer.  Execute>Compile and Run gives you a window to work with.

2.  Select Bias and load either raw bias frames or bias master (check use master bias if so)

3.  Select Dark and repeat process in step 2

4.  Select Flat and again repeat process in step 2.  Load flats for all the filters you will load in Lights

5.  Select lights and load all the light frames you wish (can load all filters)

6.  Select a registration master for the Reference Image drop down

7.  Select a destination folder for the Output drop down

8.  Press OK and now go get a cup of coffee or a glass of wine<G>.  The script will output
     the calibrated and registered light frames in the output folder in subfolders for each filter.