Commit 9abd0048 authored by rhenders's avatar rhenders
Browse files

Temporary hack to solve DES specific issue with extension numbers in tile-compressed files

parent 2f7e66c2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -304,7 +304,6 @@ void makeit()
  nok = 0;
  for (ntab = 0 ; ntab<ntabmax; ntab++, imatab = imatab->nexttab)
    {
printf("matab->naxis %d\ imatab->xtension = %s compressed? %d\n", imatab->naxis, imatab->xtension, imatab->isTileCompressed);
/*--  Check for the next valid image extension */
    if (!forcextflag && ((imatab->naxis < 2)
	|| !strncmp(imatab->xtension, "BINTABLE", 8)
@@ -692,6 +691,10 @@ static int selectext(char *filename)
    if ((bracr=strrchr(bracl+1, ']')))
      *bracr = '\0';
    next = strtol(bracl+1, NULL, 0);

    // VERY BAD HACK to check if this is tile-compressed, if so, add +1 to extension number requested
    if (strstr(filename, ".fits.fz") != NULL) next = next + 1;

    return next;
    }