Author Topic: Resampling Flats?  (Read 3422 times)

Offline savery

  • Newcomer
  • Posts: 8
Resampling Flats?
« on: 2017 January 29 18:49:45 »
Maybe this question has been answered before, but I couldn't find it.

Is there any reason why a good set of flats for 2x2 binning or 3x3 binning should not be made by resampling a set of 1x1 flats?
My reason for asking is that it seems to be difficult to get the exposure levels right for 2x2 or3x3 binned flats with my set-up, whereas I can make a nice set of 1x1 flats.

As far as I can tell, the resulting resampled flats were good for calibrating my lights.  However, I seem to remember reading somewhere that flats should always be re-imaged for each binning setting?

Stephen

Offline Geoff

  • PixInsight Padawan
  • ****
  • Posts: 908
Re: Resampling Flats?
« Reply #1 on: 2017 January 29 19:06:51 »
Resampling flats will correct vignetting and dust donuts but will not correct pixel-to-pixel variation in quantum efficiency. 
Geoff
Don't panic! (Douglas Adams)
Astrobin page at http://www.astrobin.com/users/Geoff/
Webpage (under construction) http://geoffsastro.smugmug.com/

Offline savery

  • Newcomer
  • Posts: 8
Re: Resampling Flats?
« Reply #2 on: 2017 January 30 04:55:49 »
Geoff,

Thanks for your reply, but I must admit to being a bit confused.

With 1x1 binning, pixel to pixel variation can be corrected.  However, it is in the nature of a 2x2 or 3x3 binned image, that pixel to pixel variations are no longer possible, because of the binning.  We have new "super pixels" made up from combinations of actual pixels.

When an image is binned in the camera, the photons collected from each super pixel are collected.  When resampling a 1x1 binned image to 2x2, I had understood that more or less the same thing happens - i.e. the values of adjoining groups of pixels are combined in the software to make "super pixels".  Is that an incorrect understanding?

Are you saying that we lose the possibility to correct pixel to pixel variations by using a binned flat?  That is obviously true, but what is the alternative when calibrating binned lights?  PixInsight will not accept a flat where the binning differs from the light to be calibrated, at least when using the batch processing script.

I'm sure that my technical understanding is incomplete or just wrong, but would appreciate some further explanation.

All the best,

Stephen

Offline Duncan

  • Member
  • *
  • Posts: 53
Re: Resampling Flats?
« Reply #3 on: 2017 January 30 11:12:55 »
Stephen,
I don't know how the resampling algorithm in PixInsight works, but I wouldn't expect it to be as straightforward as merging pixel values. My understanding of signal processing comes from my work in wireless communications, though, so my thinking here may be rather... 1 dimensional.  :P

A typical decimation (aka downsample) operation would include a low pass filter followed by a resample at the new resolution, which would be quite different than a pixel merge (although it would obviously look superficially very similar).

I have a similar issue with some old data that has a set of flats including one channel at 1x1 binning only, but with some data at 2x2. I was wondering whether it might be feasible to write a script that does a quasi-binning operation on the data. I wouldn't think that would be very hard, but I don't have sufficient expertise with scripting to write something like that...

Duncan

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Resampling Flats?
« Reply #4 on: 2017 January 30 11:39:12 »
the resampling routine has many interpolation options - from nearest neighbor to spline-based interpolation. IMO hardware binning is pretty close to a straight average since supposedly all the camera is doing is dumping the charge from an NxN grid of pixels into a single "superpixel".

the thing about hardware binning is that the read noise may be lower in a hardware-binned frame. maybe since flats are so "well exposed" that this does not matter, but there is a difference.

rob

Offline Duncan

  • Member
  • *
  • Posts: 53
Re: Resampling Flats?
« Reply #5 on: 2017 January 30 21:26:48 »
I understand how that would work for interpolation, ie an increase in resolution; the interpolation algorithm can generate values for brightness at arbitrary points within the image dimensions, including for intermediate points.

But I'm not at all clear what happens in the case of a reduction in resolution. In the case of an integer decimation rate like a quasi 2x2 binning, I would expect this to have the effect of just picking one of the values out of every 4 and discarding the rest. I think all of the interpolation algorithms (but I could be wrong about this) generate the original sample values at all original sample points.

For a downsample that doesn't introduce aliasing, I would expect there to be a low pass filter prior to the downsample also.

As I said, though, pretty much everything I know about signal processing is 1-dimensional, so my understanding may be misguided here...

Duncan

[edit] After reading this: https://pixinsight.com/doc/docs/InterpolationAlgorithms/InterpolationAlgorithms.html

It's definitely not the case that the interpolation algorithms produce the original sample values at the original sample points as I said above for at least some of the interpolation algorithms (at least, if I'm reading the explanation correctly).

However, I don't think any of the algorithms are likely to be helpful for the task at hand of creating something close to a post-capture binning. I'm thinking that a script to specifically do that would be required.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Resampling Flats?
« Reply #6 on: 2017 January 31 00:24:05 »
i think you can use IntegerResample in Average mode to get the equivalent of hardware binning, but not 100% sure

rob

Offline MikeOates

  • PixInsight Addict
  • ***
  • Posts: 278
Re: Resampling Flats?
« Reply #7 on: 2017 January 31 01:51:07 »

Offline Duncan

  • Member
  • *
  • Posts: 53
Re: Resampling Flats?
« Reply #8 on: 2017 January 31 05:37:44 »