Author Topic: Help on FITS files  (Read 7258 times)

Offline terry0905

  • Newcomer
  • Posts: 17
Help on FITS files
« on: 2011 May 30 08:32:04 »
I am sorry if this is covered elsewhere already but I've searched and cannot find what I'm looking for.

I have been using Nebulosity up until now for image acquisition and processing, but I love the results that people get with PI. I have been trying out PI with FITS files captured in Nebulosity (saved as Maxim FITS files in 16 bit) and I have been able to create masters frames and calibrate the image files, but then I come to debayering. Nothing I do seems to produce colour images with the right colours (they all come out pink / red). If I do the calibration in Nebulosity and debayer there, the images are fine and I can then align, etc., in PI, but clearly I'm doing something wrong and would like to use PI for calibration if possible. I have seen the thread on workflow from Canon RAW files (I am using a Canon 350D), but my files are saved as FITS and not CR2.

Thanks

Terry

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Help on FITS files
« Reply #1 on: 2011 May 30 10:19:27 »
Which camera do you have? A Canon DSLR? Did you scale the color channels?
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline terry0905

  • Newcomer
  • Posts: 17
Re: Help on FITS files
« Reply #2 on: 2011 May 30 14:58:24 »
Hi,

My camera is a Canon DSLR (350D) and I am not certain if Nebulosity scales the output from the camera, but I think a DSLR only produces 12 bits per channel so it may be getting scaled to 16 bits - there is a option to scale to 15 bits somewhere in Nebulosity or even save as 32 bit floating. This is a typical FITS header from a file if that helps.

HDU 1: Image
Image has 2 axes and is 3474 x 2316 in size
HDU has 22 keywords:
SIMPLE  =                    T / file does conform to FITS standard
BITPIX  =                   16 / number of bits per data pixel
NAXIS   =                    2 / number of data axes
NAXIS1  =                 3474 / length of data axis 1
NAXIS2  =                 2316 / length of data axis 2
EXTEND  =                    T / FITS dataset may contain extensions
COMMENT   FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT   and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H
BZERO   =                32768 / offset data range to that of unsigned short
BSCALE  =                    1 / default scaling factor
CREATOR = 'Nebulosity v2.2.4'  / program and version that created this file
INSTRUME= 'Canon DSLR: EOS 350D DIGITAL' / instrument name
DATE    = '2010-03-07 20:19:13' / UTC date that FITS file was created
DATE-OBS= '2010-03-07T20:16:58' / YYYY-MM-DDThh:mm:ss observation start, UT
EXPOSURE=                 120. / Exposure time
GAIN    =                    4 / Camera gain
OFFSET  =                    0 / Camera offset
BIN_MODE=                    1 / Camera binning mode
ARRAY_TY=                    1 / CCD array type
XBINNING=                    1 / Camera binning mode
YBINNING=                    1 / Camera binning mode
EXPTIME =                 120. / Exposure time

The file is identified as a greyscale image by PI - is there something I need to do to convert it correctly to colour?

Thanks

Terry

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Help on FITS files
« Reply #3 on: 2011 May 30 15:26:53 »
If it is a bayered version, then it is ok to be grayscale. You have to use the Debayer process to convert it to color, and use the propper channel weights to achieve "right" colors.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline terry0905

  • Newcomer
  • Posts: 17
Re: Help on FITS files
« Reply #4 on: 2011 May 30 16:26:02 »
That would explain the odd colouring, but I thought that the debayer process was supposed to apply appropriate weights to each channel. How do I alter the weights -there doesn't seem to be any parameters that can be altered in the Debayer action and I can't see any other action that allows me to alter the weightings other than through, say, the histogram transformation which doesn't seem to be the right way to do it. Colour calibration doesn't seem to correct the colour cast either.

Terry

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Help on FITS files
« Reply #5 on: 2011 May 30 17:07:10 »
What I do to get a first approximation is to open a crw (raw format) file. PI displays the channel weights (daylight multipliers) in the console. Then I use PixelMath to "normalize" the channel weights.

So, in PixelMath, disable the single equation checkbox, and just write:
$T*weight_red/max_weight
$T*weight_green/max_weight
$T*weight_blue/max_weight
with the propper values. max_weight is the larger value.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline terry0905

  • Newcomer
  • Posts: 17
Re: Help on FITS files
« Reply #6 on: 2011 May 30 23:21:03 »
Ah, PixelMaths isn't something I've played with yet, but it seems fairly straightforward so I'll give that a go.

Many thanks

Terry

Offline terry0905

  • Newcomer
  • Posts: 17
Re: Help on FITS files
« Reply #7 on: 2011 May 31 09:20:10 »
That works for my CR2 files, thanks, but I don't get the same information when I open a FITS file created by Nebulosity (which is in Maxim DL format as I understand it). I think I'll continue to Register and Debayer in Nebulosity and use PI for alignment and stacking plus processing. It's a shame, but it's a steep learning curve and I'll maybe come back to this when I'm a bit more proficient. Thanks for all the help, though.

Terry

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Help on FITS files
« Reply #8 on: 2011 May 31 09:46:39 »
The multipliers are (should) be always the same, so you just need to write them down from any cr2 file, and then apply them to the fits files.

BTW, why are you saving the raw data as FITS? Or are them calibrated frames? I would do the whole process in PixInsight. In fact, I do the whole process for my Canon 300D camera, and it is pretty straightforward.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline terry0905

  • Newcomer
  • Posts: 17
Re: Help on FITS files
« Reply #9 on: 2011 May 31 12:40:29 »
I happen to have been using Nebulosity which captures the RAW data into a FITS file and doesn't appear to allow the files to be captured as CR2 files, unless I leave the files on the memory card rather than saving them on my computer. I can change to some other capture software but I have quite a few sessions that I would like to process. In Northern England, the sky won't get dark again until some time in August/September so I am restricted to working with what I already have for now. Out of interest, what capture software do you use? I would like to switch to doing everything in PixInsight once I have a better grip on what I'm doing!

Many thanks

Terry

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Help on FITS files
« Reply #10 on: 2011 May 31 15:59:27 »
Right now, I just leave everything on the memory card. I'm buying a new T2i so I think I'll change my workflow. I'm not sure what to use. I've heard that BackyardEOS does a pretty good job.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com