Author Topic: Moving images back to CCDStack  (Read 5824 times)

Offline phcjpp

  • Newcomer
  • Posts: 44
    • Wimbledon Astronomy
Moving images back to CCDStack
« on: 2013 November 08 11:26:04 »
Hi Guys,

I only use PI for my workflow but my scope partner likes to work in CCDStack and then PS. He is having enormous trouble using the master frames I create following my usual calibration in PI. Any ideas on what I need to do to the L,R,G,B masters to make them compatible with CCDStack so he can run DDP / Deconvolution etc ? E.g he would like the background scale not from 0-1 but instead say 0-130,000. I have tried saving in 32-bit unsigned integer but this did not seem to help things much.

Cheers
Chris

Offline topboxman

  • PixInsight Addict
  • ***
  • Posts: 292
    • Peter's Gallery
Re: Moving images back to CCDStack
« Reply #1 on: 2013 November 08 11:30:40 »
It might be best to save PI generated images in 16 bit unsigned integer in order for other processing software to reliably process.

Peter

Offline phcjpp

  • Newcomer
  • Posts: 44
    • Wimbledon Astronomy
Re: Moving images back to CCDStack
« Reply #2 on: 2013 November 09 00:24:57 »
Thanks! Will give it a try.

Chris

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Moving images back to CCDStack
« Reply #3 on: 2013 November 09 06:44:17 »
Hi Chris!
You can save your image in PI as FITS 32-Bit Floating Point, selecting
in the File Save Dialog the FITS Option    " O  32-bit IEEE 754 floating point"

This format is perfect readable in CCDSTACK. When you move the Cursor in CCDSTACK over the loaded Image
you see the values of each Pixel. Making the image visable on the display in CCDSTACK is simple by selecting in CCDSTACK
Process
  PixelMath
    multiply by    130000   
(for example to have it as 17-Bit Image).
    multiply by      65535        (for example to have it as 16-Bit Image, including values after the comma)
    followed by "Apply to This"

I do not recommend to transfer stacked images in TIF Format as reducing
a stacked 32-bit Floating Point Image to 16-Bit TIF reduces the dynamic because
of rounding. Unstacked 16-bit single Images can be transfered without dynamic loss  as 16-bit TIF unsigned.

Generally i would not exchange CalibrationMasterFrames from one program to the other
i would create them in each program seperately

Gerald
« Last Edit: 2013 November 10 10:00:34 by oldwexi »

Offline jerryyyyy

  • PixInsight Old Hand
  • ****
  • Posts: 425
    • Astrobin Images
Re: Moving images back to CCDStack
« Reply #4 on: 2013 November 10 09:11:08 »
I have a related problem with some files from the French PixInsight group.  I have their files from a dark site in Arizona, but they created their masters with Maxim DL.  I recreated PI masters for the Flats and Darks because they also furnished the original files from the SBIG camera.  But not I do not have the originals for the Bias.

The PI created masters work because I can calibrate the images using the new dark and flat masters... but I very clearly see the defect the Bias should correct.

I have wasted hours trying to figure out how to move from the Maxim DL Master Bias to a PI Master Bias.... is there a magic trick???  It is not evident I could do it by editing the FITS file... just saving it again does not seem to work either.
Takahashi 180ED
Astrophysics Mach1
SBIG STT-8300M and Nikon D800
PixInsight Maxim DL 6 CCDComander TheSkyX FocusMax

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Moving images back to CCDStack
« Reply #5 on: 2013 November 10 09:58:06 »
Hi Jerry!
Usual error when saving masters and single frames in Maxim is - saving them as signed integer.
After loading them in PI they look only gray and the histogram is in the middle.

I correct them in PI by using PixelMath
$T / 0.5
save

Using now STF shows the bias with all brightness differences also on the screen.


Gerald

Offline jerryyyyy

  • PixInsight Old Hand
  • ****
  • Posts: 425
    • Astrobin Images
Re: Moving images back to CCDStack
« Reply #6 on: 2013 November 10 10:40:03 »
Hi Jerry!
Usual error when saving masters and single frames in Maxim is - saving them as signed integer.
After loading them in PI they look only gray and the histogram is in the middle.

I correct them in PI by using PixelMath
$T / 0.5
save

Using now STF shows the bias with all brightness differences also on the screen.


Gerald

Thanks for the quick response, but this does not solve the problem.  If I open the Maxim-made master bias in PI it looks OK and the histogram shows a peak about 1/4 of the way over from the left.  It is not all greyed out....???
Takahashi 180ED
Astrophysics Mach1
SBIG STT-8300M and Nikon D800
PixInsight Maxim DL 6 CCDComander TheSkyX FocusMax

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Moving images back to CCDStack
« Reply #7 on: 2013 November 10 11:16:41 »
jerry, integrated frames coming out of maxim have a different, but related problem.

if i remember correctly maxim's default is to save integrated files in f32 format with a range of 0.0 - 65535.0. in this case if you tell PI to "ask on out of range values" and manually type in 0.0 to 65535.0 in the dialog box, you'll be good. the only kink is that there may be pedestal values called out in the fits header that you may have to subtract manually.

then if you save those fits files out you'll have PI-friendly masters. this is what i had to do with the files from lightbuckets.com and they did work for me.

rob

Offline jerryyyyy

  • PixInsight Old Hand
  • ****
  • Posts: 425
    • Astrobin Images
Re: Moving images back to CCDStack
« Reply #8 on: 2013 November 10 12:50:07 »
jerry, integrated frames coming out of maxim have a different, but related problem.

if i remember correctly maxim's default is to save integrated files in f32 format with a range of 0.0 - 65535.0. in this case if you tell PI to "ask on out of range values" and manually type in 0.0 to 65535.0 in the dialog box, you'll be good. the only kink is that there may be pedestal values called out in the fits header that you may have to subtract manually.

then if you save those fits files out you'll have PI-friendly masters. this is what i had to do with the files from lightbuckets.com and they did work for me.

rob

Well, I have been delving into the FITS header a bit to try and understand what is going on here and this really looks like a weird format. 

PEDESTAL is -100
BSCALE is 1
BZERO is 0

So I guess the image is normalized from 0 to 1. 

On stats for 0,1 the mean is 0.12 for 16 bit it is about 8000... on one of my PI bias files the numbers are much lower.

Not clear how to rescale this.

I did ask the French for the raw files... but I guess I am learning something here. 
Takahashi 180ED
Astrophysics Mach1
SBIG STT-8300M and Nikon D800
PixInsight Maxim DL 6 CCDComander TheSkyX FocusMax

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Moving images back to CCDStack
« Reply #9 on: 2013 November 10 12:54:00 »
no, that's not what BSCALE means…

Quote
KEYWORD:   BSCALE
REFERENCE: FITS Standard
STATUS:    reserved
HDU:       image
VALUE:     real
DEFAULT:   1.0
COMMENT:   linear factor in scaling equation
DEFINITION: This keyword shall be used, along with the BZERO keyword,
when the array pixel values are not the true physical values, to
transform the primary data array values to the true physical values
they represent, using the equation: physical_value = BZERO + BSCALE *
array_value.  The value field shall contain a floating point number
representing the coefficient of the linear term in the scaling
equation, the ratio of physical value to array value at zero offset.
The default value for this keyword is 1.0.

1.0 is just the default value and for an integrated image it does not have much meaning anyway.

if you scale from 0.0 to 65535.0 i'm sure the files will come out looking right.

rob


Offline phcjpp

  • Newcomer
  • Posts: 44
    • Wimbledon Astronomy
Re: Moving images back to CCDStack
« Reply #10 on: 2013 November 10 13:11:46 »
Thanks oldwexi - i will also give that a go!

Cheers
Chris

Offline jerryyyyy

  • PixInsight Old Hand
  • ****
  • Posts: 425
    • Astrobin Images
Re: Moving images back to CCDStack
« Reply #11 on: 2013 November 10 21:46:55 »
Guys, I appreciate all the effort, but I gave up and calibrated and integrated in Maxim... then brought into PI.  Have to work on it some more. 

Takahashi 180ED
Astrophysics Mach1
SBIG STT-8300M and Nikon D800
PixInsight Maxim DL 6 CCDComander TheSkyX FocusMax

Offline phcjpp

  • Newcomer
  • Posts: 44
    • Wimbledon Astronomy
Re: Moving images back to CCDStack
« Reply #12 on: 2013 November 11 13:04:21 »
oldwexi - you are a superstar - works perfectly!!!

My colleague multiplied the 0-1 range floating point PI file by 65k using CCDSTACK pixel math and voila everything works.

Thanks so much
Chris

Offline jerryyyyy

  • PixInsight Old Hand
  • ****
  • Posts: 425
    • Astrobin Images
Re: Moving images back to CCDStack
« Reply #13 on: 2013 November 12 17:56:36 »
oldwexi - you are a superstar - works perfectly!!!

My colleague multiplied the 0-1 range floating point PI file by 65k using CCDSTACK pixel math and voila everything works.

Thanks so much
Chris
Boy, you know I tried this for the Maxim Master files I was working on and no go.   Good news was the Maxim stacked files read right into PI. 
Takahashi 180ED
Astrophysics Mach1
SBIG STT-8300M and Nikon D800
PixInsight Maxim DL 6 CCDComander TheSkyX FocusMax