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
Standardize the linearization code #25
Merged
Merged
Conversation
This file contains 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
r-owen
force-pushed
the
tickets/DM-5462
branch
3 times, most recently
from
May 26, 2016 16:33
816f12e
to
4f10bc4
Compare
r-owen
force-pushed
the
tickets/DM-5462
branch
4 times, most recently
from
June 6, 2016 20:16
648bbfd
to
d77964c
Compare
Use IsrTask.suspectDetection to set SUSPECT flag and use IsrTask.config.doLinearize config parameter. Add doSuspect config parameter to control setting SUSPECT flag since doLinearize is no longer appropriate.
Linearize using lsst.ip.isr.LinearizeSquared (linearization type = "Squared"), retrieving it from the camera mapper (though the coefficients come from the amp info table, as before). Remove the existing "linearize" method, since it was no longer used. Update amp info catalogs to set linearization type to "Squared" if linearization is wanted, and "None" if not (e.g. suprimecam and those HSC CCDs that had all zeros for their squared coefficient). Here is the log of conversions: hsc/camera Converting 112 files 0_00.fits: 'Squared' 0_01.fits: 'Squared' 0_02.fits: 'Squared' 0_03.fits: 'Squared' 0_04.fits: 'Squared' 0_05.fits: 'Squared' 0_06.fits: 'Squared' 0_07.fits: 'Squared' 0_08.fits: 'Squared' 0_09.fits: 'Squared' 0_10.fits: 'Squared' 0_11.fits: 'Squared' 0_12.fits: 'Squared' 0_13.fits: 'Squared' 0_14.fits: 'Squared' 0_15.fits: 'Squared' 0_16.fits: 'Squared' 0_17.fits: 'Squared' 0_18.fits: 'Squared' 0_19.fits: 'Squared' 0_20.fits: 'Squared' 0_21.fits: 'Squared' 0_22.fits: 'Squared' 0_23.fits: 'Squared' 0_24.fits: 'Squared' 0_25.fits: 'Squared' 0_26.fits: 'Squared' 0_27.fits: 'Squared' 0_28.fits: 'Squared' 0_29.fits: 'Squared' 0_30.fits: 'Squared' 0_31.fits: 'Squared' 0_32.fits: 'Squared' 0_33.fits: 'Squared' 0_34.fits: 'Squared' 0_35.fits: 'Squared' 0_36.fits: 'Squared' 0_37.fits: 'Squared' 0_38.fits: 'Squared' 0_39.fits: 'Squared' 0_40.fits: 'Squared' 0_41.fits: 'Squared' 0_42.fits: 'Squared' 0_43.fits: 'Squared' 0_44.fits: 'Squared' 0_45.fits: 'Squared' 0_46.fits: 'Squared' 0_47.fits: 'Squared' 0_48.fits: 'None' 0_51.fits: 'None' 0_52.fits: 'None' 0_53.fits: 'Squared' 0_54.fits: 'Squared' 0_55.fits: 'Squared' 0_56.fits: 'Squared' 0_57.fits: 'None' 1_00.fits: 'Squared' 1_01.fits: 'Squared' 1_02.fits: 'Squared' 1_03.fits: 'Squared' 1_04.fits: 'Squared' 1_05.fits: 'Squared' 1_06.fits: 'Squared' 1_07.fits: 'Squared' 1_08.fits: 'Squared' 1_09.fits: 'Squared' 1_10.fits: 'Squared' 1_11.fits: 'Squared' 1_12.fits: 'Squared' 1_13.fits: 'Squared' 1_14.fits: 'Squared' 1_15.fits: 'Squared' 1_16.fits: 'Squared' 1_17.fits: 'Squared' 1_18.fits: 'Squared' 1_19.fits: 'Squared' 1_20.fits: 'Squared' 1_21.fits: 'Squared' 1_22.fits: 'Squared' 1_23.fits: 'Squared' 1_24.fits: 'Squared' 1_25.fits: 'Squared' 1_26.fits: 'Squared' 1_27.fits: 'Squared' 1_28.fits: 'Squared' 1_29.fits: 'Squared' 1_30.fits: 'Squared' 1_31.fits: 'Squared' 1_32.fits: 'Squared' 1_33.fits: 'Squared' 1_34.fits: 'Squared' 1_35.fits: 'Squared' 1_36.fits: 'Squared' 1_37.fits: 'Squared' 1_38.fits: 'Squared' 1_39.fits: 'Squared' 1_40.fits: 'Squared' 1_41.fits: 'Squared' 1_42.fits: 'Squared' 1_43.fits: 'Squared' 1_44.fits: 'Squared' 1_45.fits: 'Squared' 1_46.fits: 'Squared' 1_47.fits: 'Squared' 1_48.fits: 'None' 1_51.fits: 'None' 1_52.fits: 'None' 1_53.fits: 'Squared' 1_54.fits: 'Squared' 1_55.fits: 'Squared' 1_56.fits: 'Squared' 1_57.fits: 'None' suprimecam/camera Converting 10 files Chihiro.fits: 'Squared' Clarisse.fits: 'Squared' Fio.fits: 'Squared' Kiki.fits: 'Squared' Nausicaa.fits: 'Squared' Ponyo.fits: 'Squared' San.fits: 'Squared' Satsuki.fits: 'Squared' Sheeta.fits: 'Squared' Sophie.fits: 'Squared' suprimecam/mit_camera Converting 10 files si001s.fits: 'None' si002s.fits: 'None' si005s.fits: 'None' si006s.fits: 'None' w4c5.fits: 'None' w67c1.fits: 'None' w6c1.fits: 'None' w7c3.fits: 'None' w93c2.fits: 'None' w9c2.fits: 'None'
Change self.log.log(self.log.INFO, ... to self.log.info(... and similarly for warnings.
Also fix one instance of leading tabs instead of spaces
Remove unused imports Add one or two missing imports Reorder imports to meet our standard Replace "not a in b" with "a not in b" Replace "a == None" with "a is None" Replace "raiseRuntimeError" with "raise RuntimeError" Rename a few variables in list comprehensions to avoid changing other variables (and make pyflakes happy) Break some instances of multiple imports and multiple statements into separate lines Remove trailing whitespace Remove trailing ;
ccdTesting.py used a mix of pyplot and plt; standardize on plt.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Linearize using lsst.ip.isr.LinearizeSquared, retrieving it
from the camera mapper (though the coefficients come from
the amp info table, as before).
Remove the existing method that linearized.
Move suspect pixel masking to its standard location.
Add a config parameter to disable suspect pixel masking
(it used to be controlled by doLinearize).