Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

CR2 flats with FITS lights

  • Please log in to reply
11 replies to this topic

#1 physics23

physics23

    Explorer 1

  • *****
  • topic starter
  • Posts: 91
  • Joined: 23 Feb 2021

Posted 16 May 2025 - 10:09 AM

Hi everyone, I have a Canon t2i and I recently transitioned to KStars. For my first set of data, I took all lights in FITS format. However, I took darks and flats using an intervalometer, so they were saved in the native CR2 format. When trying to calibrate the lights on Pixinsight, I get an "incompatible geometry" error, and in fact the FITS lights are 5184x3456 (the sensor size declared for the T2i, which I inputted in the driver configuration), while the CR2 flats/darks are 5202x3464. I have 17 hours of data over 6 nights, so I would love not to waste it. How can I fix this? In particular:

 

1) Did the INDI Canon DSLR driver rescale the image to the 5184x3456, or did it crop it?

2) If it cropped it, where is the cropping centered?

 

Any suggestion for how to appropriately elaborate these flats and darks to be able to use them is very welcome!



#2 Marcus1

Marcus1

    Mariner 2

  • -----
  • Posts: 272
  • Joined: 21 Jan 2025

Posted 16 May 2025 - 10:31 AM

IrfanView is an excellent free image file conversion tool that has batch conversion capabilities, including resizing. check it out

#3 physics23

physics23

    Explorer 1

  • *****
  • topic starter
  • Posts: 91
  • Joined: 23 Feb 2021

Posted 16 May 2025 - 10:36 AM

Thanks! My problem is not how to convert, but what exactly I should do (resampling vs cropping, and if cropping where to center the crop)



#4 Marcus1

Marcus1

    Mariner 2

  • -----
  • Posts: 272
  • Joined: 21 Jan 2025

Posted 16 May 2025 - 11:41 AM

Or did it just add a border of 9 pixels on one side and four on the other?

#5 jwisn2

jwisn2

    Sputnik

  • *****
  • Posts: 26
  • Joined: 31 Aug 2011
  • Loc: Maryland, USA

Posted 16 May 2025 - 11:54 AM

It seems like CR2 file contains edge rows and columns which are masked. You can take two pictures of the same scene containing a lot of fine detail (e.g. walpaper or carpet) with immobilized camera/telescope - one with intervalometer and saved as cr2, another with KStars, saved as fits, to figure out what is excluded from fits image. Then crop cr2 files accordingly. You may have to save them as fits (without de-bayering, watch for vertical flip).

 

Jan


  • lambermo likes this

#6 Marcus1

Marcus1

    Mariner 2

  • -----
  • Posts: 272
  • Joined: 21 Jan 2025

Posted 16 May 2025 - 12:14 PM

Filestar.com
Converts cr2 to fits

Edited by Marcus1, 16 May 2025 - 12:15 PM.


#7 lambermo

lambermo

    Apollo

  • -----
  • Posts: 1,371
  • Joined: 16 Jul 2007
  • Loc: .nl

Posted 16 May 2025 - 12:27 PM

echo " 5202 - 5184 "|bc -l # 18
echo " 3464 - 3456 "|bc -l # 8

So I suspect if you convert the large CR2's to FITS and then crop (should be easy with ImageMagick command line tools) symmetrically, so 9 from the left and 4 from the top for upper left corner, and 9 from the right and 4 from the bottom for the lower right corner, that you get the proper aligned results for flats and dark.



#8 physics23

physics23

    Explorer 1

  • *****
  • topic starter
  • Posts: 91
  • Joined: 23 Feb 2021

Posted 16 May 2025 - 02:24 PM

Thanks everyone, these are very good suggestions and I'll try them out!



#9 bignerdguy

bignerdguy

    Vanguard

  • *****
  • Posts: 2,300
  • Joined: 31 Oct 2019
  • Loc: Lewisville, TX

Posted 16 May 2025 - 04:30 PM

I ran into the same problem.  i used PI's Resample option to resize the Flats slightly.  it didn't adversely affect the calibration of the lights by doing so since they were very close to the same size.



#10 BucketDave

BucketDave

    Surveyor 1

  • -----
  • Posts: 1,840
  • Joined: 25 Apr 2021
  • Loc: Bristol, UK

Posted 20 May 2025 - 02:35 AM

You could have a look for hot pixels to help determine how many extra rows/cols are on each side. Do a quick bit of experimentation with different numbers of extra rows until the hot pixels in the calibrated lights (lights minus darks) disappear.

#11 BucketDave

BucketDave

    Surveyor 1

  • -----
  • Posts: 1,840
  • Joined: 25 Apr 2021
  • Loc: Bristol, UK

Posted 20 May 2025 - 02:38 AM

Since the CR2 cal files are bigger, you only need to work out how to crop the master dark. Then do the same crop to the master flat and master dark flat.

#12 physics23

physics23

    Explorer 1

  • *****
  • topic starter
  • Posts: 91
  • Joined: 23 Feb 2021

Posted 01 June 2025 - 03:14 PM

Just an update for anyone who might face the same problem: I managed to crop the masters appropriately. I first took picture of a carpet as suggested above, identified where most of the crop was, then refined it by matching the pixel number of hot pixels in the master dark with hot pixels in the lights. Finally, I tested by calibrating lights and verifying hot pixels are gone.

 

In the end the needed crop for the CR2 was: 1) 1 pixel row at the top; 2) 7 pixel rows at the bottom; 3) 18 pixel rows from the right (none from the left).

 

Hope this helps someone in the future, and thanks again for all the suggestions!


  • lambermo likes this


CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics