Skip to content

Fix 186 and 173#190

Merged
HannoSpreeuw merged 7 commits intomasterfrom
Fix_186
Dec 17, 2025
Merged

Fix 186 and 173#190
HannoSpreeuw merged 7 commits intomasterfrom
Fix_186

Conversation

@HannoSpreeuw
Copy link
Copy Markdown
Collaborator

Fixes #186
Fixes #173

Back to a default subimage size of 64 instead of 32 pixels.

1) In due time, we will want to remove these lines
   "
       no_pandas_df_dict = {"pandas_df": False}
       conf_export = replace(conf_export, **no_pandas_df_dict)
   "
   See issue #170. Until that issue is solved, this comment may be useful.
2) Reformatting from Black.
1) pyse -v should show the PySE version. Fixes #173.
2) Fixed typo.
1) "--grid n" should match "--back-size-x n --back-size-y n", i.e. this fixes #186. The problem came from the line "conf = read_conf(config_file)", which means that "conf.image.back_size_x" and "conf.image.back_size_y" are always set to 32 pixels (default) and not None. This means that they always override "self.conf.image.grid" in the "image" module - see the lines referred to under 2) - and we will always end up with square subimages of 32² pixels for kappa * sigma clipping.
2) "grid" should remain at the level of the cli. In the "image" module we had a line "back_size_x = self.conf.image.back_size_x or self.conf.image.grid" and similarly for "back_size_y". There is no point in propagating "grid" this far into PySE.
"grid" does not only exist as command-line parameter, but also exists as an attribute of "ImgConf", i.e. it can be set by any user of the PySE libraries instead of the command line and that is the way it should be. This partially reverts commit a17bf64, i.e. the part described under 2) in the commit message of a17bf64.
1) A default (square) subimage size of 64 is more suitable and aligns with the SExtractor's default setting. This also aligns with PySE's old default setting, see https://tkp.readthedocs.io/en/latest/tools/pyse.html. The background levels near sources are less accurate (mean too high) with a (square) subimage size of only 32 pixels.
2) "grid" should be near "back_size_x" and "back_size_y" in ImgConf, since these parameter settings have similar effects.
3) There is no need for a default value for "back_size_x" and "back_size_y" if we have a default value for "grid".
These test classes were built (or modified relatively recently) when the default (square) subimage size was 32 pixels. Now that we have reverted back to a default subimage size of 64 pixels for kappa * sigma clipping, we need explicit settings for these classes.
@HannoSpreeuw HannoSpreeuw self-assigned this Dec 17, 2025
@HannoSpreeuw HannoSpreeuw merged commit 2bfff3e into master Dec 17, 2025
9 checks passed
@HannoSpreeuw HannoSpreeuw deleted the Fix_186 branch December 17, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Equivalence of "--back-size-x 50" & "--back-size-y 50" with "--grid 50" PySE outputs which version of code

1 participant