Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernised matrix syntax in FITS files now following standard 3.0: #606

Merged
merged 1 commit into from
Jun 27, 2017

Conversation

dpetry
Copy link
Contributor

@dpetry dpetry commented Jun 23, 2017

Format is now XXi_j. No leading zeros in indices.
This is part 1 of 2 for a fix to CAS-9993 which reports general problems with the PC matrix
in cases where the matrix is non-diagonal.

Format is now XXi_j. No leading zeros in indices.
@dpetry dpetry requested a review from tammojan June 23, 2017 07:49
<< setfill('0') << setw(2) << jj;
name += String(ostr);
ostringstream ostr;
if(nrow>9){
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this magic number 9 mean something? If so, could you put a comment here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's simply the transition from a one-digit to a two-digit decimal integer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I mean the integer for the indices of the matrix.

@dpetry
Copy link
Contributor Author

dpetry commented Jun 27, 2017

Any objections to me merging this pull request?

@mpokorny
Copy link
Contributor

I'm no FITS expert, but the changes look straightforward enough, and seem OK to me. As for magic number, I usually prefer not to have them; in this case, it's fairly clear what the meaning is, but a comment surely wouldn't hurt for the benefit of the next person to look at the code.

@dpetry
Copy link
Contributor Author

dpetry commented Jun 27, 2017

OK, will do in the second instalment of my work on CAS-9993 . Promise.

@tammojan tammojan merged commit 3664f3e into master Jun 27, 2017
@gijzelaerr gijzelaerr deleted the CAS-9993_pcmatrix_fix branch October 31, 2018 14:18
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.

3 participants