Ticket #42 (closed defect: duplicate)
second parsing error
| Reported by: | andersld@… | Owned by: | mgalloy |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | core | Version: | 3.0 |
| Keywords: | Cc: |
Description
I have a feeling this has the same root cause as ticket #41, but I'll submit a second ticket anyway. This time the parsing fails at:
END ELSE:BEGIN
ctype1 = 'GLON ' ctype2 = 'GLAT '
END
ENDCASE
The "ctype" and "ELSE" statements have no effect - they may be removed. If any of the three "END" statements are there, all routines following this one do not create web output. I'll attach the entire code below.
;+ ; Creates a dummy header for images withough astronometry information ; ; :Private: ; ;- PRO Plot_Fits_MkHdr, hdr, image, xrange=xrange, yrange=yrange, zrange = zrange, $
Dimensions = Dimensions, Coord=coord
IF Keyword_Set(Dimensions) THEN s = image ELSE s = Float(size(image, /dim)) IF N_Elements(coord) EQ 0 THEN coord = 'GALACTIC' CASE StrUpCase?(coord) OF
'GALACTIC':BEGIN
ctype1 = 'GLON ' ctype2 = 'GLAT '
END 'EQUATORIAL':BEGIN
ctype1 = 'RA-- ' ctype2 = 'DEC- '
; END
ELSE:BEGIN
ctype1 = 'GLON ' ctype2 = 'GLAT '
; END ;ENDCASE
; Create basic header mkhdr, hdr, image
; Add values so one pixel is the cdelt and the starting value is crval cdelt1 = (xrange[1]-xrange[0]) / s[0] sxaddpar, hdr, 'CTYPE1', ctype1 sxaddpar, hdr, 'CDELT1', cdelt1 sxaddpar, hdr, 'CRVAL1', xrange[0] + cdelt1/2. sxaddpar, hdr, 'CRPIX1', 1
cdelt2 = (yrange[1]-yrange[0]) / s[1] sxaddpar, hdr, 'CTYPE2', ctype2 sxaddpar, hdr, 'CDELT2', cdelt2 sxaddpar, hdr, 'CRVAL2', yrange[0] + cdelt2/2. sxaddpar, hdr, 'CRPIX2', 1
IF N_Elements(s) EQ 3 THEN BEGIN
cdelt3 = (zrange[1]-zrange[0]) / s[2] sxaddpar, hdr, 'CTYPE3', 'VELO-LSR' sxaddpar, hdr, 'CDELT3', cdelt3 sxaddpar, hdr, 'CRVAL3', zrange[0] sxaddpar, hdr, 'CRPIX3', 1
ENDIF END; Plot_Fits_MkHdr--------------------------------------------------------------------------------
