-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow overscan region to be along either axis #72
Conversation
Matt--why not change this so that oscan_axis can be set by the user and is an optional paramter? That would seem like it would be less likely to fail due to some really weird case. |
What should the default be? Would be inclined to make it |
I'd suggest 1 as I think that is probably most common from experience, but I could also imagine if it is set to None, then in defaults to the behaviour, but you will have to add this to the documentation |
Will go with "explicit is better than implicit" and make the default 1 (and eliminate the guessing). |
Updated to make overscan axis an explicit argument
Apologies for commenting on an old PR, but I was wondering whether it would be an option to also have the ability to guess the overscan axis, by explicitly using The use case for this would be when the overscan section is obtained directly from a FITS header (TRIMSEC, BIASSEC or such) and passed on to overscan = ccd[slice_from_string(fits_section, fits_convention=True)] it could deduce the overscan axis from the shape of the overscan section. (Any decent FITS file should, of course, have the overscan direction as a header card, but that's quite often not the case, and the direction is implied.) |
@evertrol -- would you mind open a separate issue for this? |
I have created an example implementation at PR #263 |
As reported in #70,
subtract_overscan
assumed that the axis along which the overscan should be aggregated (with either median or mean) was the second of the two axes. This allows the overscan to be in either axis (though it will fail in the unlikely case that the overscan is square).