I've added an hdu_list attribute to the Image class that allows us to flexibly add new HDUs to an Image without having to hardcode in attributes, such as how we are currently treating Image.bias. In fact, this PR demonstrates the functionality by completely replacing Image.bias. Part of the motivation for this came up in a conversation with @neilzim about future spectroscopic dataset. There is a new Image.add_extension_hdu() function.
Another advantage of this implementation is that means that if we decide at some point we no longer need to carry around some information then we can drop HDUs, e.g. when saving data to a new level. For example, do level 4 data products need to drag around the pre-scan bias information?
Type of change
New feature (non-breaking change which adds functionality)
Reference any relevant issues (don't forget the #)
If we decide to go this route it will affect several current PRs, such as PR #116, PR #105, as it will provide a convenient way to attach new HDUs (e.g. the PTC for the KGain class). Its also relevant for issue #112.
Checklist before requesting a review
[x] I have linted my code
[x] I have verified that all unit tests pass in a clean environment and added new unit tests, as needed
[x] I have verified that all docstrings are properly formatted and added new documentation, as needed
Describe your changes
I've added an
hdu_list
attribute to theImage
class that allows us to flexibly add new HDUs to an Image without having to hardcode in attributes, such as how we are currently treatingImage.bias
. In fact, this PR demonstrates the functionality by completely replacingImage.bias
. Part of the motivation for this came up in a conversation with @neilzim about future spectroscopic dataset. There is a newImage.add_extension_hdu()
function.Another advantage of this implementation is that means that if we decide at some point we no longer need to carry around some information then we can drop HDUs, e.g. when saving data to a new level. For example, do level 4 data products need to drag around the pre-scan bias information?
Type of change
Reference any relevant issues (don't forget the #)
If we decide to go this route it will affect several current PRs, such as PR #116, PR #105, as it will provide a convenient way to attach new HDUs (e.g. the PTC for the KGain class). Its also relevant for issue #112.
Checklist before requesting a review