You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
replace the trim_image call in combine with direct slicing to avoid logging. - #393
The reason why the exception in #390 occured was because for some reason (haven't investigated it) it wasn't possible to create a HIERARCH card for the compressed image. For normal calls to ccdproc.core functions one could disable logging by setting the add_keywords parameter but that's currently not possible for ccdproc.combine.
However it's just not necessary to add the logging message for the trimming to Header because the trimming is not really done, it's just there to avoid using too much memory.
So instead of trimming the ccddata object it's just sliced in combine. This fixes the error locally but I haven't been able to create a test case for this.
@MSeifert04 I think I'd prefer to keep trim_image but use add_keyword=False to it. Just in case there is some behavior or change in terms of how the slicing is done. No keywords need to be added and so this can be skipped.
@crawfordsm Yes, there will be one (but I thought that might be advisable) change in behaviour: The array isn't copied twice.
The trim_image function copies the slice but it's copied once more directly afterwards in Combiner. Otherwise this is - in this case - equivalent to using slicing directly.
@crawfordsm If no fits_section is given the trim_image function only copies and returns the CCDData object. And providing a fits_section makes no sense at this point in combine because it's only sliced to avoid overflowing the RAM.
So I'm pretty certain this won't change the behaviour in any way.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #390
The reason why the exception in #390 occured was because for some reason (haven't investigated it) it wasn't possible to create a HIERARCH card for the compressed image. For normal calls to
ccdproc.corefunctions one could disable logging by setting theadd_keywordsparameter but that's currently not possible forccdproc.combine.However it's just not necessary to add the logging message for the trimming to Header because the trimming is not really done, it's just there to avoid using too much memory.
So instead of trimming the ccddata object it's just sliced in combine. This fixes the error locally but I haven't been able to create a test case for this.