Repository navigation
Superflat task including both simple and Welford combine methods - #35
Conversation
…multiple masks exist
…e methods, tests, and fixed small bug
…inor fixes, added mad to final ptc stats
weatherhead99
left a comment
There was a problem hiding this comment.
looks good, very minor comments
| _check_same_shape(count=count, mean=mean, m2=m2) | ||
| data = np.where(count > 0, mean, np.nan) | ||
| std = np.sqrt(np.divide(m2, count - 1, out=np.full_like(m2, np.nan, dtype=float), where=count > 1)) | ||
| return {'data': data, 'std': std, 'count': count.copy()} |
There was a problem hiding this comment.
think key "data" here should proabbly be renamed "mean" TBH.
There was a problem hiding this comment.
problem is, to keep DetImage xarray dataset consistent and the api usage in tasks unchanged, I made it so that 'data' data_var must exist in the dataset, and contain the primary data array. Since in this case that is the mean array, it gets set in 'data'.
Maybe I can change data to mean/median here in core and set to the data data_var inside the task?
There was a problem hiding this comment.
huh. Yes that's a bit clunky. I think the most sensible thing to do is rename this key inside the task even though that's annoying - this function should (in principle) be usable separately outside a task and the "mean" name is a bit nicer
There was a problem hiding this comment.
I'll fix this in next PR
| return self.final_image_result | ||
|
|
||
| @property | ||
| def methods(self): |
There was a problem hiding this comment.
add return type hint here
weatherhead99
left a comment
There was a problem hiding this comment.
all looks ok to me
Added SuperCombine task to make superflats within the current task design. Tests for core algorithms and superflat flow tested in notebook.
Two choices for methods:
Added DEIMOS FCS detector config as well, example loading in Example_image_loading.ipynb
Added mean of diff pair MADs in PTC stats.