-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Image gain restoration #73
Comments
I found a simple code below may work: divfactor = detect_cosmics(np.ones((3, 3)), gain=1., niter=0)[1][0, 0]
if divfactor != 1.:
_ccd.data = cleanarr / divfactor but any better idea? A digression: MBP 15": [2018, macOS 11.6, i7-8850H (2.6 GHz; 6-core), RAM 16 GB (2400MHz DDR4), Radeon Pro 560X (4GB)] |
I am still using the above code. BTW, trying on mini-forge, I found this:
%timeit divfactor = detect_cosmics(np.ones((3, 3)), gain=1., niter=0)[1][0, 0]
643 µs ± 29 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)
In [4]: %timeit divfactor = detect_cosmics(np.ones((3, 3)), gain=1., niter=0)[1][0, 0]
14.5 µs ± 59 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each) I think this speedup is not due to |
I remember previously astroscrappy.detect_cosmics returned the cleaned array multiplied by gain factor, but now it does not. (I could not find CHANGELOG.. )
It used to be
if my memory is correct, and this is why I used my custom function to do
nccd.data = cleanarr / gain
.Now I find my processed images have extremely small counts & SNR (as I have gain ~ 10).
How can I write a code which incorporates both versions of astroscrappy within a single function?
(e.g., for
inbkg
,bkg
,pssl
stuff, I could use try-except clause)The text was updated successfully, but these errors were encountered: