Skip to content

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

Open
preller wants to merge 2 commits into
astropy:mainfrom
preller:fix-crtf-meta-only-comma
Open

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

Conversation

@preller

@preller preller commented Aug 23, 2026

Copy link
Copy Markdown

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Meta data output in CRTF file

2 participants