Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

PSFEx validation catalogue: ACCEPTED compares unrelated numberings

Open Beginner friendly
#980 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
data

Research direction

Start in PSFExInterpolator._write_output_validation in src/shapepipe/modules/psfex_interp_package/psfex_interp.py, where ACCEPTED is populated from SOURCE_NUMBER, and confirm the mismatch between training and validation row numbering. Then follow the ACCEPTED column into merge_starcat.py's optional columns and remove it from both output paths. Done means validation catalogues no longer emit ACCEPTED and classic merge no longer zero-fills it, with any affected tests adjusted.

Written by the indexing model from the issue text.

Description

The ACCEPTED column of the PSFEx validation catalogues carries no information.
It is not a science bug: rho and tau statistics use the held-out validation stars either way.
But anyone reading ACCEPTED as "PSFEx used this star" is misled.

PSFExInterpolator._write_output_validation (src/shapepipe/modules/psfex_interp_package/psfex_interp.py) sets it like this:

data["ACCEPTED"] = np.ones_like(data["NUMBER"], dtype="int16")
star_used = psfex_cat_dict.pop("SOURCE_NUMBER")
for idx in range(len(data["NUMBER"])):
    if idx + 1 not in star_used:
        data["ACCEPTED"][idx] = 0

SOURCE_NUMBER numbers the rows of the PSFEx training catalogue (.cat).
idx + 1 is the row position in the validation catalogue, which holds the other 20% of stars (setools RAND_SPLIT, RATIO=20).
The two numberings are unrelated, so the test compares a validation row index with training row numbers.

In v2 production, every validation star gets ACCEPTED = 1.
In classic runs, merge_starcat.py zero-fills the column after the pix2world conversion, so v1.4 star catalogues have all zeros.

By construction, a validation star was never offered to PSFEx, so "accepted by PSFEx" is not defined for it.
We propose to drop the column from the validation output and from merge_starcat's optional columns.
If a per-star training flag is wanted, it belongs in the training catalogue, matched on NUMBER.

— Claude (Opus) on behalf of Cail

Dominant language
Python
Stars
18
Forks
14
Avg merge
4d 14h
Merged PRs (30d)
44

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CosmoStat/shapepipe

All issues in CosmoStat/shapepipe

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.