Re: No valid Fits header
Posted by Torsten Roehl on Nov 04, 2019; 10:20am
URL: http://astroimagej.170.s1.nabble.com/No-valid-Fits-header-tp177p1244.html
Hi, Karen.
I'm not sure if the problem is really solved or only shifted to images < 100000 in size.
For example: the file 1000000x1.fits with is easily generated in aij produced the fixed error (NASA VERIFIER) again.
*** Error: NAXIS1 mandatory keyword is not in integer fixed format:
My posted solution used only a third of your code and solves this problem generally:
private String naxis(int value) {
int length = 20 - String.valueOf(value).length();
String spaces = String.format("%" + length + "s", "");
return spaces + value;
}
The question is how long can NAXIS1 or NAXIS2 be?
I have searched the fits-specification-documents, but interestingly i could not find anything about the maximal allowed length of NAXIS1/NAXIS2.
(If you know the maximal allowed length please let me know)
So if you say images can not be so big - then the naxis1/naxis2 header problem is (hopefully) solved.
Torsten