Do you use a polynomial? Or a smooth function? Something else?
Do you apply a 1D or 2D correction?
One technique I have used for spectral data is to average the flat-field in the cross-dispersion direction, apply a smooth function to the resultant curve and then subtract that smooth function from each row in the dispersion direction.
My data are windowed, however, so each flat-field only covers around 200 pixels in the cross-dispersion direction. Unlike in my case, do you find that you need to do a 2D correction? What about the case where GMOS is used for imaging?
I usually apply a one-dimensional correction based on a polynomial fit to the spectrum in the dispersion direction. However I think it is best to divide the spectrum by this function, rather than subtract the function from the data.
If you are dealing with cross-dispersed data, and you have different orders on the same exposure, I suggest splitting the image and transforming each order before applying the flat-field.
Oops – yes I absolutely meant divide as well, not subtract. I must have mis-typed!
Thanks for the suggestion for cross-dispersed data. My data aren’t cross-dispersed, but it’s useful to have ideas for this procedure. I’m trying to stimulate discussion on this forum about best practices for data reduction, so it’s really helpful to have your input.