Skip to content
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

Fixes 119 #121

Merged
merged 6 commits into from
Feb 6, 2025
Merged

Fixes 119 #121

merged 6 commits into from
Feb 6, 2025

Conversation

HannoSpreeuw
Copy link
Collaborator

Fixes #119
but not yet as the most sustainable solution, that is why we leave #74 open.

"x", "y", "sig" and "reduced_chisq" are now part of the output .csv file by default.

"pyse" --> "pyse.py"

"print_" from "six" no longer needed.

It also fixes this bug for "thin" detections i.e. that most errors were zero.

1) It turned out that for islands that do not satisfy the minimal-width criterion, which is a requirement for a realistic mmoments computation, no error bars were computed at all. The solution chosen here is to use the "extract.ParamSet()._error_bars_from_moments" method for thin detections, since they will likely provide a better (larger) estimate of the true error bars than "extract.ParamSet()._condon_formulae", which is applied after a successful Gaussian fit.
This is an ad hoc solution, since "extract.ParamSet()._error_bars_from_moments" may still be underestimating the true error bars for thin detections, but it is in agreement with vectorized source processing as in "fitting.moments_enhanced".
To implement this, "extract.ParamSet" needs the "thin_detection" attribute.
2) Grammar correction.
3) Line break to stay within 80 characters per line.
Add pixel coordinates of source centres, signal-to-noise ratios and reduced chi-squared statistics to output csv file by default.
"pyse" is a Python script, not a shell script, therefore it should have the ".py" extension.
"six" Python 2->3 compatibility library not needed.
"print_" was used, but "print()" from Python 3 should serve our needs.
Without the repeated "%f", which is error prone.
"%f" should correspond to ".6f".
@HannoSpreeuw HannoSpreeuw self-assigned this Feb 6, 2025
@HannoSpreeuw HannoSpreeuw merged commit b4ce061 into master Feb 6, 2025
6 checks passed
@HannoSpreeuw HannoSpreeuw deleted the Fix_119 branch February 6, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding S/N and peak pixels to the output CSV file
1 participant