geminiplanetimager / gpi_pipeline

Gemini Planet Imager Data Reduction Pipeline
Other
8 stars 6 forks source link

Investigate whether interpolation in Interpolate Wavelength Axis is sufficiently accurate #37

Open dsavransky opened 8 years ago

dsavransky commented 8 years ago

Sorry, I wanted to delete an update but it deleted the entire thread!

repasting here...

Laurent's PSF subtraction experiments suggest that linear interpolation is not good enough and we should be using something more precise. But that was for the rotation step, not th wavelength rescaling. Still, we should at some point check how much error is introduced in this step.

mperrin commented 8 years ago

Legacy issue migrated from redmine issue tracker. Filed by @pi11235 in 2014.

Probably no action at this time. But see also recent SPIE paper by @swolff9

dsavransky commented 8 years ago

Recovering rm journals for issue:

ingraham: For VCP-190 (spectral reproduction characterization) - there is evidence to suggest that we are not properly reproducing the spectra in regions of sharp slopes (be it from the edges of the filters or quite possibly from sharp spectral features in data).

The attached plot shows the calibrated K1 spectrum of HD 8049b (18800K white dwarf) done in two ways.

blue: spectrophotometric calibration done using the satellite spots black: spectrophotometric calibration done using a standard taken at the same airmass 1h after HD 8049b.

Conditions were not ideal so the water band at <1.95 um might be subject to error. The atmospheric feature at 2.0um is not water (I think it's CO2), so it should not be affect (sky transmission spectrum also attached).

I'm not claiming the interpolation step is to blame.... but I think it's the first place to look...

mperrin: Interesting plot! It's never been clear to me why the data at the edges of the bandpass always seem to systematically curve upwards. The black calibration here using the standard star. looks much more well behaved.

It also looks quite significant how much smaller the error bars are on the second method using the standard star.

ingraham: The satellite spots are not very bright for this data (whereas the standard is booming). The companion however is very bright. So the error bars of the standard extraction (blue) are really dominated by the sat spots, not the companion.

The error bars for the spectrum calibrated using the standard star (black) might be slightly under-estimated since the background used to determine the error uses a rectangular piece on either side of the standard and not an annulus (although I don't expect this to make much difference)

Full disclosure - there was also a normalization factor of 2.3 that I removed for this plot. I'm guessing this is due to clouds since the standard was taken 1 hour afterwards and the conditions were variable. (throughput was already corrected for different apodizer/lyot)

mperrin: I'm just adding a tag to Laurent on this one to get his opinion about how much we should care about this, based on P1640 experiences and so forth.

mperrin: I'm not sure it's fair to consider this a "bug". Relabel as New Feature Request or Enhancement?

Also I'm guessing we are not going to prioritize this in the next couple weeks for 1.3, so we should delay this to 1.4. I'm fine with that. Any objections?

ingraham: I don't see this happening before 1.4..... so let's just make it so.

I agree it isn't really a bug as well... moved to "Testing needed"

patrickingraham commented 8 years ago

So I investigated this and found that this is interpolation error due to the under-sampling problem. If you convolve every microspectra by a 2-pixel gaussian the issue then goes away. We/I never implemented this to the pipeline because it only happens in regions where there is essentially zero flux and the SED of objects we look at are not very sharp (even if a planet has a sharp feature - most of hte light in each microspectra is from the flat SED of the star).

Also, convolving by the gaussian does more weird things to the errorbars... which we're already struggling to understand.