Skip to content

PSFEx validation catalogue: ACCEPTED compares unrelated numberings #980

Open

Description

@cailmdaley

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions