Skip to content

Fix doubled comma in CRTF output when range/corr is the only metadata - #700

Merged
larrybradley merged 2 commits into
astropy:mainfrom
preller:fix-crtf-meta-only-comma
Sep 1, 2026
Merged

Fix doubled comma in CRTF output when range/corr is the only metadata#700
larrybradley merged 2 commits into
astropy:mainfrom
preller:fix-crtf-meta-only-comma

Conversation

@preller

@preller preller commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

This PR fixes the CRTF writer emitting a doubled comma (, ,) when range or corr is the only metadata of a region, which makes the output unparseable by CASA. Relevant when CRTF files are generated programmatically for machine-readable pipelines. The metadata items are now collected in a list and joined once, so an empty separator cannot appear; this also removes the existing special case that guarded the coord= key against the same problem. A regression test is included. Fixes #322

@preller
preller marked this pull request as ready for review August 23, 2026 16:54

@keflavich keflavich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, assuming this passes CI, lgtm.

@larrybradley larrybradley added bug io.crtf CASA region file format labels Sep 1, 2026
@larrybradley larrybradley added this to the 0.13 milestone Sep 1, 2026

@larrybradley larrybradley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @preller

@larrybradley
larrybradley merged commit 5cb0e68 into astropy:main Sep 1, 2026
35 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug io.crtf CASA region file format

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Meta data output in CRTF file

3 participants