Author Topic: Flat field problem  (Read 15747 times)

Offline Stu

  • PixInsight Enthusiast
  • **
  • Posts: 79
Re: Flat field problem
« Reply #30 on: 2016 April 08 17:11:23 »
Marcus,

I'm having trouble with your files.  Your CR2 files are saturated, and not very large.  Is this a 12 bit camera?  In that case, everything I said above is wrong in terms of your ADU target.  Your 12 bit ADU target would be 2048.

Stuart

Offline gianpri

  • Member
  • *
  • Posts: 56
Re: Flat field problem
« Reply #31 on: 2016 April 08 17:25:04 »
My DSLR is a Canon 40D 14-bit

Offline Stu

  • PixInsight Enthusiast
  • **
  • Posts: 79
Re: Flat field problem
« Reply #32 on: 2016 April 08 17:57:52 »
Actually, I meant Magnus, not Marcus, sorry.

Not sure what is the issue with the files.  Anyway, my prior advice stands--do a saturated image, measure the ADU and then go iteratively less until you get to 50% of your ADU. 

Good luck!
Stuart

Offline magnusl

  • PixInsight Enthusiast
  • **
  • Posts: 84
Re: Flat field problem
« Reply #33 on: 2016 April 09 00:51:31 »
Hi!

This one is a 350D, so 12 bit (I also use a 70D, 14 bit - but not for the flats I posted now). I get that. And I'll follow your advice on saturaded and the backwards from that.

But still: I have exactly the same situation as Gianpri - the mean in the statistics module is far lower than expected, as is the maximun - in my case alsp for the very saturated files, which is what I wanted to show with them. What are these values from the statistics module?? They seem not to make sense, given what we are talking about here. Or am I missing something basic?

(I'll see if I can post a bias shortly)

Magnus
« Last Edit: 2016 April 09 01:31:21 by magnusl »

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Flat field problem
« Reply #34 on: 2016 April 09 08:49:18 »
i still think you should debayer the files just to be able to see the different levels in each channel.

rob

Offline magnusl

  • PixInsight Enthusiast
  • **
  • Posts: 84
Re: Flat field problem
« Reply #35 on: 2016 April 09 09:09:57 »
Hi Rob!

Yes, I did. And not change - that is, instead of one value, I get essentially the same value for 2 of the channels, with the red lower due to my CLS-filter. It did not produce any more reasonable levels.

Now, I have a hunch: these are 12-bit cr2-files, converted by Ekos to fits (however, same problem if I download original cr2-files to PI). When opening them, PI says something about "fits 16-bits". My hunch: could these odd and far too low values (despite the fact that the images are saturated) result from something with PI treating them as 16 bits? Then again, the statistics tool allows me to choose this... I'm just guessing here, trying to make sense of the values. I mean - I have saturated files that seems to be "too dark"....?

Or do I misinterpret the values?

Magnus

Offline gianpri

  • Member
  • *
  • Posts: 56
Re: Flat field problem
« Reply #36 on: 2016 April 09 10:55:09 »
I did it too (see answer # 29)

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Flat field problem
« Reply #37 on: 2016 April 09 13:39:24 »
oh i didn't realize they were 12-bit CR2 files. in that case the maximum value as a 16-bit integer file is 4095. i think that explains it?

rob

Offline magnusl

  • PixInsight Enthusiast
  • **
  • Posts: 84
Re: Flat field problem
« Reply #38 on: 2016 April 10 09:51:06 »
Hi!

Well. It would explain it, if the maximum value in the statistics tool, for a saturated image, was 4095, when the tool is set to 12 bits. (as I understand it)

However, see the attached image. It is totally saturated. According to Ekos, the maximum value is 4095. But PI gives a far lower value. THis is the mystery to me....

« Last Edit: 2016 April 10 09:59:51 by magnusl »

Offline Stu

  • PixInsight Enthusiast
  • **
  • Posts: 79
Re: Flat field problem
« Reply #39 on: 2016 April 10 11:47:01 »
I am unsure.  But here is a properly exposed 16 bit flat for you to look at for reference.
https://drive.google.com/file/d/0B6nhQcbEB-XURUJTTGZnRmxNUEE/view?usp=sharing


Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Flat field problem
« Reply #40 on: 2016 April 10 13:02:59 »
i think all that's going on here is that the only right way to view the values in these files in PI is to either set the statistics to real or 16-bit. the 14 and 12 bit views in statistics are simply rescaling the data. in this case the fully saturated value is 4095; this works out to 4095/65535 or 0.0624857. 0.0624857*4095 = 255, which is what you see when you set the statistics tool to 14-bit. in other words, PI is not just truncating the data when calculating the stats, it's scaling it.

the data from these cameras is either 12 or 14 bits, but when the CR2 files come into PI the data numbers are brought in as-is and stored as 16-bit samples. so basically if you have a 14-bit camera, try to get your flat median to 8192 when viewed as a 16-bit integer, or 0.125 when viewed as a real. if you have a 12-bit camera, try to get your flat median to 2048 when viewed as 16-bit int, or 0.03125 when viewed as a real.

rob

Offline magnusl

  • PixInsight Enthusiast
  • **
  • Posts: 84
Re: Flat field problem
« Reply #41 on: 2016 April 10 13:05:51 »
Hi!

Rob, thanks!! I think you've cleared it all up a lot, at least on my end!!

Magnus

Offline gianpri

  • Member
  • *
  • Posts: 56
Re: Flat field problem
« Reply #42 on: 2016 April 11 09:08:21 »
Okay, Rob, I think I understand. But you must admit that it is not really intuitive! It is 'my limit, but I do not understand why it should be always referred to 16-bit, regardless of the camera used.
Anyway thanks. You said an image 14-bit saturated normalized to 0.25. 16-bit, therefore, is 1.0 or 15-bit is 0.5. It's correct ?

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Flat field problem
« Reply #43 on: 2016 April 11 09:50:11 »
well, it is because most astronomical CCD cameras use the 16-bit integer format for their output. i16 is a FITS sample format standard as well, so canon cameras are the exception, which is why they are treated differently.

yes a saturated 14-bit image in a 16-bit space should have ADUs of 16383, and 16383/65535 is ~0.25. a saturated 15-bit image would have ADUs of 32767, and 32767/65535 is ~0.5.

rob

Offline magnusl

  • PixInsight Enthusiast
  • **
  • Posts: 84
Re: Flat field problem
« Reply #44 on: 2016 April 11 10:06:30 »
Hi!

Just a small detail, then: the ~50% (or lower) ADU that I am aiming for - is that for mean, or for median? I note that the median is far lower, that's the one I use. Is that a good or bad idea?

Magnus