IR tools#36
Conversation
|
@sosey @stscicrawford What is the process forward to merge this into wfc3tools? |
|
It will need to be reviewed -- if you can confirm it works how you would like, I'll provide a code by the end of the week as I think this was submitted as part of the hack day. |
|
I've left a few minor comments on here for review, but if there isn't time to address them, I would be okay to merge as is, but then open issues for them to be addressed in the future. It isn't required, but if there was any tests, it would be useful to add them as well. So if this is something that you would like available urgently, I would be okay to merge. |
|
|
||
| """Bookkeeping + call to calwf3 to make ima from raw, turning CRCORR switch off.""" | ||
|
|
||
| ### temporary rename of file |
There was a problem hiding this comment.
It might be better to use the temp file rather than giving it a specific name in the case where 'temp_'+rawfile might exist before hand
|
|
||
| def _reprocess_raw_crcorr(raw_file): | ||
|
|
||
| """Bookkeeping + call to calwf3 to make ima from raw, turning CRCORR switch off.""" |
There was a problem hiding this comment.
Still would be good to have the input parameters listed here even for private functions
|
|
||
| def _calc_avg(data, stats_method, sigma_clip, sigma, sigma_upper, sigma_lower, iters): | ||
| """ Returns a mean or median from an array, with optional sigma clipping.""" | ||
| if not sigma_clip: |
There was a problem hiding this comment.
This could be simplified with the following code:
mean, med, s = sigma_clipped_stats(data, sigma = sigma, sigma_lower = sigma_lower,
sigma_upper = sigma_upper, iters = iters)
if stats_method == 'median':
return med
return mean
And sigma_clip is set to False, then requiring iters=0
|
@cshanahan1 and @mackjenn , is this PR still relevant after 7 years? |
|
Yes, this is still an issue. It is important for the workflow in this notebook, e.g. for datasets where ASN_ID = None (for example, when observations in the same filter are taken with dithered POS-TARGs and not with dither patterns.) |
added ir_tools.py, with ramp-flattening function. will populate this with more functions (discussed on hack day) shortly.
Fix #38