Closed sylvielsstfr closed 1 year ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
spectractor/fit/fit_spectrum.py | 26 | 27 | 96.3% | ||
spectractor/simulation/image_simulation.py | 5 | 6 | 83.33% | ||
spectractor/tools.py | 12 | 15 | 80.0% | ||
spectractor/simulation/simulator.py | 42 | 46 | 91.3% | ||
spectractor/extractor/chromaticpsf.py | 39 | 45 | 86.67% | ||
spectractor/extractor/images.py | 16 | 24 | 66.67% | ||
spectractor/fit/fit_multispectra.py | 29 | 38 | 76.32% | ||
spectractor/extractor/spectrum.py | 117 | 127 | 92.13% | ||
spectractor/fit/fitter.py | 54 | 65 | 83.08% | ||
spectractor/simulation/libradtran.py | 48 | 60 | 80.0% | ||
<!-- | Total: | 677 | 755 | 89.67% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
spectractor/tools.py | 1 | 90.06% | ||
spectractor/fit/fit_multispectra.py | 2 | 71.51% | ||
spectractor/extractor/spectrum.py | 3 | 92.48% | ||
spectractor/extractor/extractor.py | 3 | 89.39% | ||
spectractor/extractor/chromaticpsf.py | 7 | 91.45% | ||
<!-- | Total: | 16 | --> |
Totals | |
---|---|
Change from base Build 3463953628: | 9.9% |
Covered Lines: | 7047 |
Relevant Lines: | 7818 |
Major improvements for Spectractor new version 2.3
I have corrected two problems
return arr.reshape(shape).sum(-1).sum(1) instead of return arr.reshape(shape).mean(-1).mean(1)
I have checked the final spectrum for CCD_REBIN = 2 was at the same flux level as for CCD_REBIN =1
When making the sub_image_subtracted little image sub_image_subtracted = sub_image - bkgd_2D(X, Y)
we must suppress negative values like this:
SDC : very important clipping negative signal, avoiding crash later sub_image_subtracted = np.where(sub_image_subtracted<0,0,sub_image_subtracted)
Because later these values are considered as weights (to find the target center).
Since that correction, I haven't anymore crashes.
Other things added, : few control plots in debug mode and make nicer plots by changing some sizes.