Welcome to iraf.net Monday, May 13 2024 @ 12:25 AM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 bug in fxcor heliocentric julian dates?
   
kstassun
 01/28/2008 09:03PM (Read 6367 times)  
+----
Newbie

Status: offline


Registered: 02/18/2006
Posts: 9
Hi, The 'fxcor' task (in IRAF v2.14) is doing something strange with its computation of heliocentric julian dates. From a bit of experimentation, I think I have tracked this down to being an inability of fxcor to properly deal with date/time header keywords that have the yyyy-mm-ddThh:mm:ss.sss format. I have verified that the 'setjd' task seems to handle this just fine, so the problem is not a general one, rather it seems to be specific to fxcor.Obviously it would be best if 'fxcor' calculated HJDs correctly on its own. For the time being, it would be useful to simply know if this error also affects the heliocentric corrections that fxcor computes? Thanks.

 
Profile Email
 Quote
fitz
 01/28/2008 09:03PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Can you post an image header for the suspected problem, I get the same result using either SETJD or FXCOR in my test.One thing to check is whether or not the difference can be accounted for by the exposure time. FXCOR will use a 'UTMIDDLE' keyword if present for the computation, otherwise it'll assume the DATE-OBS is start exposure time and offset by half the exposure time to get the effective middle. If you're doing this interactively, the 'v' keystroke will show you the verbose log where warnings about keywords can be found at the bottom.
-Mike

 
Profile Email
 Quote
kstassun
 01/28/2008 09:03PM  
+----
Newbie

Status: offline


Registered: 02/18/2006
Posts: 9
It's a long header (from CTIO 4m Hydra). As you'll see, the UTMIDDLE keyword is in the yyyy-mm-ddThh:mm:ss.sss format. The HJD keyword that you see is from 'setjd' (and is correct). The HJD that 'fxcor' reports is 3842.08053 (which is very different, and not correct). After the image header I also include below the fxcor 'keywpars' parameters.IMAGE HEADER FOLLOWS:orion5.skysub.ms[3914,71][real]: orion5
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [3914,71], length of user area 11421 s.u.
Created Mon 15:46:03 28-Jan-2008, Last modified Mon 15:45:57 28-Jan-2008
Pixel file "orion5.skysub.ms.fits" [ok]
EXTEND = F / File may contain extensions
ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator
IRAF-TLM= '15:45:57 (28/01/2008)' / Time of last modification
OBJECT = 'orion5 ' /
DATE = '2008-01-16T21:22:13'
IRAF-MAX= 1.529600E4 / DATA MAX
IRAF-MIN= 1.479000E3 / DATA MIN
OPICNUM = 326 / Original picture number
HDR_REV = '2.000 13Feb96 (add mode and group to hdrs)' /
IMAGETYP= 'OBJECT ' / Type of picture (object, dark, etc.)
DETECTOR= 'SITe4096' / Detector (CCD type, photon counter, etc.)
PREFLASH= 0.000000 / Preflash time in secs
CCDSUM = '1 1 ' / On chip summation (X,Y)
XSTART = '1 ' / start roi in X
YSTART = '1 ' / start roi in Y
XLENGTH = '2048 ' / length of roi in X
YLENGTH = '4096 ' / length of roi in Y
UTSHUT = '01:13:24.418' / UT of shutter open
OBSERVAT= 'CTIO ' / Origin of data
TELESCOP= 'CTIO 4.0 meter telescope' / Specific system
NAMPSYX = '1 1 ' / Num amps in y & x (eg. '2 2'=quad)
AMPLIST = '12 ' / Readout order in y,x
BSEC12 = '[1:54,1:4096]' / Bias section definition for Amp12
CCDSEC = '[36:1936,75:3925]' / Section in full CCD for DATASEC
ASEC12 = '[1:2136,1:4096]' / Section read with Amp12
CSEC12 = '[1:2072,1:4096]' / Section in full CCD for DSEC12
DSEC12 = '[65:2136,1:4096]' / Image area in raw frame for Amp12
TSEC12 = '[65:2112,1:4096]' / Trim section definition for Amp12
TEMPERAT= 'CCD 154.9 N2 74.2 Vent 118' /
PCLOCK = 'P1 -9.0 1.0 P2 -9.0 1.0 P3 -7.0 2.5 OFD 13.96' /
AMP11 = 'SCK -6.0 4.9 LG -4.06 RG -1.0 8.0 RD 13.96 DD 24.96' /
AMP12 = 'SCK -6.0 4.9 LG -4.06 RG -1.0 8.0 RD 13.95 DD 24.96' /
WAVEFILE= 'Obs Fri Jan 20 15:45:23 2006' /
WAVEMODE= 'MPP OverlapXmit EarlyReset' / Waveform mode switches on
GTINDEX = 2 / Gain selection (index into Gain Table)
PIXELT = 25800 / (ns) unbinned pixel read time
DCS_TIME= 8400 / (ns) Double Correlated Sample time
EXPTIME = 2400.000 / Exposure time in secs
DARKTIME= 2405.172 / Total elapsed time in secs
OBSERVER= 'Keivan Stassun' / Observers
PROPID = '2005B-0075' / Proposal Id
TELID = 'ct4m' / CTIO 4.0-m Telescope
ARCONVER= '17Oct97ver7_22' / Arcon software version
COMMENT METEOROLOGICAL INFORMATION
WEATDATE= 'Jan 23 00:46:02 2006' / Date and time of last update
WINDSPD = '2.2' / Wind speed (mph)
WINDDIR = '169' / Wind direction (degrees)
AMBTEMP = '16.7' / Ambient temperature (degrees C)
HUMIDITY= '59' / Ambient relative humidity (percent)
PRESSURE= '781' / Barometric pressure (millibars)
SEEING = 'mysql_query():Unknown Error seeing=column' / Tololo DIMM seeing
COMMENT INSTRUMENT PARAMETERS
CLAMP = 'off' / Old lamp in use
UT = '00:48:20.3' / UT of TCS coordinates
ST = '04:14:00.9' / siderial time
RA = '05:35:00.52' / right ascension (telescope)
DEC = '-05:16:59.5' / declination (telescope)
EQUINOX = '2000.0' / epoch of RA & DEC
ZD = '31.4' / zenith distance (degrees)
AIRMASS = '1.142121' / airmass
TELFOCUS= '152631' / Telescope focus
COMPLAMP= 'park' / Comparison lamp
GRATANGL= '55.326' / grating angle (degrees)
FIBER = '12070' / Fiber focus (microns)
FILTER = '2' / Filter position
SHUTTER = 'unknown' / Shutter position whatever this means
NEWALL = 'unknown' / Newall mask position
LED = 'off' / LED status (on/off)
INCL = '-24.900' / Fiber head inclination (degrees)
FLDNAME = 'orion5.fin.hydra' / Configuration file name
FLDTIME = 'Sun Jan 22 20:47:56 2006' / Time at end of configuration
FLDLST = '5:15:00.0' / Anticipated LST at mid exposure
FLDCNTR = '5:34:59.95 -05:17:00.0 2000.0' / Coordinates of field center
FIBCABLE= 'LARGE' / Hydra Fibre Cable Name
CABLESZ = '141' / Number of fibers in cable
ICSSEQ = 96 / ICSINFO-sequence
ICSDATE = 'Jan 22 21:48:22' / ICSINFO-timestamp
RECID = 'ct4m.060123.013232' / NOAO Archive record ID
RDNOISE = 3.
GAIN = 1.
DATE-OBS= '2006-01-23T01:08:20.30'
WCSDIM = 2
LTM1_1 = 1.
LTM2_2 = 1.
WAT0_001= 'system=equispec'
WAT1_001= 'wtype=linear label=Wavelength units=Angstroms'
WAT2_001= 'wtype=linear'
TRIM = 'Jan 15 18:51 Trim data section is [100:2000,75:3925]'
OVERSCAN= 'Jan 15 18:51 Overscan section is [1:54,1:4096] with mean=1573.997'
ZEROCOR = 'Jan 15 18:51 Zero level correction image is Zero'
CCDPROC = 'Jan 15 18:59 CCD processing done'
FLATCOR = 'Jan 15 18:59 Flat field image is Flat with scale=0.999972'
JD = 2453758.54745718
LJD = 2453758.
APNUM1 = '2 1 131.24 141.53'
APNUM2 = '4 1 156.05 166.30'
APNUM3 = '6 1 180.60 191.15'
APNUM4 = '7 1 193.09 203.60'
APNUM5 = '9 1 218.03 228.55'
APNUM6 = '11 1 243.05 253.12'
APNUM7 = '12 1 255.25 265.53'
APNUM8 = '13 1 267.44 277.90'
APNUM9 = '14 1 280.20 290.63'
APNUM10 = '16 1 304.65 314.91'
APNUM11 = '17 1 317.37 327.77'
APNUM12 = '20 1 354.37 364.73'
APNUM13 = '21 1 367.06 377.15'
APNUM14 = '24 1 404.16 414.63'
APNUM15 = '25 1 416.46 427.03'
APNUM16 = '26 1 429.10 439.26'
APNUM17 = '28 1 453.44 463.86'
APNUM18 = '29 1 466.09 476.42'
APNUM19 = '30 1 478.33 489.16'
APNUM20 = '31 1 491.01 501.06'
APNUM21 = '32 1 503.24 513.57'
APNUM22 = '35 1 540.34 550.44'
APNUM23 = '36 1 552.56 562.85'
APNUM24 = '38 1 577.60 588.01'
APNUM25 = '39 1 590.15 600.28'
APNUM26 = '40 1 602.32 612.69'
APNUM27 = '42 1 627.01 637.32'
APNUM28 = '43 1 639.37 649.63'
APNUM29 = '44 1 651.79 661.95'
APNUM30 = '50 1 726.05 736.37'
APNUM31 = '51 1 738.42 748.61'
APNUM32 = '53 1 763.20 773.42'
APNUM33 = '56 1 800.13 810.54'
APNUM34 = '57 1 812.61 822.88'
APNUM35 = '58 1 825.05 835.05'
APNUM36 = '59 1 837.45 847.57'
APNUM37 = '60 1 850.01 859.93'
APNUM38 = '64 1 899.34 909.28'
APNUM39 = '67 1 936.30 945.00'
APNUM40 = '71 1 986.66 996.73'
APNUM41 = '77 1 1060.02 1069.90'
APNUM42 = '78 1 1072.24 1082.02'
APNUM43 = '82 1 1121.64 1131.59'
APNUM44 = '86 1 1171.18 1180.91'
APNUM45 = '89 1 1208.12 1218.16'
APNUM46 = '90 1 1220.63 1230.47'
APNUM47 = '92 1 1245.57 1255.20'
APNUM48 = '97 1 1307.17 1316.78'
APNUM49 = '98 1 1319.47 1328.97'
APNUM50 = '99 1 1332.04 1341.43'
APNUM51 = '100 1 1344.20 1353.79'
APNUM52 = '101 1 1356.73 1366.28'
APNUM53 = '102 1 1369.15 1378.52'
APNUM54 = '105 1 1406.22 1415.73'
APNUM55 = '106 1 1418.44 1428.52'
APNUM56 = '107 1 1430.81 1440.45'
APNUM57 = '108 1 1443.20 1453.09'
APNUM58 = '114 1 1517.24 1526.62'
APNUM59 = '116 1 1542.10 1551.55'
APNUM60 = '117 1 1554.33 1563.88'
APNUM61 = '118 1 1567.03 1576.28'
APNUM62 = '120 1 1591.72 1600.98'
APNUM63 = '122 1 1616.27 1625.71'
APNUM64 = '124 1 1641.05 1650.32'
APNUM65 = '126 1 1666.03 1675.55'
APNUM66 = '127 1 1678.21 1687.60'
APNUM67 = '128 1 1690.46 1699.81'
APNUM68 = '135 1 1777.25 1786.71'
APNUM69 = '138 1 1814.34 1823.72'
APNUM70 = '139 1 1826.80 1835.93'
APNUM71 = '141 1 1851.32 1860.88'
CTYPE1 = 'LINEAR '
CTYPE2 = 'LINEAR '
CRVAL1 = 6204.3383789063
CRPIX1 = 1.
CDELT1 = 0.0845597557420781
CDELT2 = 1.
CD1_1 = 0.0845597557420781
CD2_2 = 1.
DC-FLAG = 0
DCLOG1 = 'REFSPEC1 = tharlongorion4.ms'
NCOMBINE= 3
BANDID1 = 'spectrum - background none, weights variance, clean yes'
APID1 = 'SM1480 JW550 I=14.5 (4022)'
APID2 = 'SM2294 JW10 I=13.9 (4593)'
APID3 = 'SM9999 JW75 I=11.1 (7000)'
APID4 = 'SM661 JW I=13.5 (2004)'
APID5 = 'SM2719 JW639 I=13.6 (3540)'
APID6 = 'SM2196 JW177 I=14.5 (4641)'
APID7 = 'SM3530 JW36 I=14.4 (3575)'
APID8 = 'SM1551 JW383 I=14.5 (3141)'
APID9 = 'SM3432 JW321 I=13.7 (3544)'
APID10 = 'SM2337 JW178 I=14.0 (3102)'
APID11 = 'SM3260 JW750 I=12.8 (4518)'
APID12 = 'SM2230 JW3013 I=14.0 (3107)'
APID13 = 'SM2259 JW3 I=13.0 (1003)'
APID14 = 'SM44 JW I=14.2 (3120)'
APID15 = 'SM3510 JW3145 I=13.2 (7057)'
APID16 = 'SM1444 JW828 I=13.9 (3093)'
APID17 = 'SM1282 JW776 I=13.7 (3078)'
APID18 = 'SM9999 JW839 I=13.5 (3707)'
APID19 = 'SM2684 JW835 I=14.0 (3105)'
APID20 = 'SM2834 JW880 I=14.1 (3564)'
APID21 = 'SM1208 JW990 I=14.0 (3555)'
APID22 = 'SM1510 JW406 I=13.9 (3091)'
APID23 = 'SM1424 JW736 I=13.8 (3547)'
APID24 = 'SM2005 JW961 I=12.2 (3501)'
APID25 = 'SM2698 JW906 I=14.1 (3562)'
APID26 = 'SM1542 JW879 I=14.3 (1539)'
APID27 = 'SM2194 JW253 I=13.9 (4591)'
APID28 = 'SM3466 JW88 I=13.1 (4533)'
APID29 = 'SM9999 JW866 I=11.8 (7053)'
APID30 = 'SM3487 JW73 I=14.2 (4016)'
APID31 = 'SM2007 JW968 I=12.0 (3002)'
APID32 = 'SM9999 JW3020 I=13.5 (4810)'
APID33 = 'SM2011 JW I=12.5 (3012)'
APID34 = 'SM2474 JW128 I=12.6 (3017)'
APID35 = 'SM10 JW I=14.0 (3104)'
APID36 = 'SM2010 JW940 I=12.0 (3001)'
APID37 = 'SM3776 JW239 I=12.8 (3029)'
APID38 = 'SM1417 JW361 I=13.6 (4568)'
APID39 = 'SM2413 JW I=13.7 (3073)'
APID40 = 'SM1630 JW692 I=13.2 (4543)'
APID41 = 'SM2320 JW140 I=13.9 (3549)'
APID42 = 'SM1828 JW708 I=13.8 (4584)'
APID43 = 'SM2174 JW106 I=13.4 (3530)'
APID44 = 'SM3559 JW120 I=14.3 (2013)'
APID45 = 'SM2012 JW I=12.4 (3007)'
APID46 = 'SM9999 JW783 I=14.2 (4803)'
APID47 = 'SM2267 JW122 I=14.4 (2515)'
APID48 = 'SM2128 JW187 I=14.4 (1541)'
APID49 = 'SM2401 JW I=14.1 (3111)'
APID50 = 'SM2654 JW363 I=12.7 (1509)'
APID51 = 'SM9999 JW3158 I=13.0 (4840)'
APID52 = 'SM9999 JW784 I=12.9 (4804)'
APID53 = 'SM2008 JW705 I=12.2 (4502)'
APID54 = 'SM2443 JW I=14.2 (3126)'
APID55 = 'SM1703 JW841 I=14.3 (4622)'
APID56 = 'SM9999 JW790 I=10.9 (7046)'
APID57 = 'SM3550 JW135 I=13.7 (3541)'
APID58 = 'SM3707 JW40 I=14.5 (1544)'
APID59 = 'SM3562 JW76 I=13.6 (3538)'
APID60 = 'SM600 JW I=14.0 (3098)'
APID61 = 'SM1397 JW413 I=14.3 (4626)'
APID62 = 'SM9999 JW5073 I=12.5 (4838)'
APID63 = 'SM1634 JW932 I=13.1 (4541)'
APID64 = 'SM3310 JW813 I=12.3 (3503)'
APID65 = 'SM9999 JW1026 I=13.8 (3709)'
APID66 = 'SM9999 JW3136 I=12.5 (4828)'
APID67 = 'SM2995 JW850 I=13.4 (3529)'
APID68 = 'SM2745 JW498 I=13.8 (7026)'
APID69 = 'SM2001 JW867 I=12.2 (4501)'
APID70 = 'SM3668 JW123 I=13.0 (3043)'
APID71 = 'SM716 JW I=13.9 (2008)'
UTMIDDLE= '2006-01-23T01:53:29.80'
HJD = 2453758.55128421
FXCOR KEYWPARS PARAMETERS: (ra = "RA") Right Ascension keyword
(dec = "DEC") Declination keyword
(ut = "") UT of observation keyword
(utmiddle = "utmiddle") UT of mid-point of observation keyword
(exptime = "") Exposure time keyword
(epoch = "equinox") Epoch of observation keyword
(date_obs = "date-obs") Date of observation keyword\n
(hjd = "HJD") Heliocentric Julian date keyword
(mjd_obs = "MJD-OBS") Modified Julian Date of observation keyword
(vobs = "VOBS") Observed velocity keyword
(vrel = "VREL") Relative velocity keyword
(vhelio = "VHELIO") Heliocentric velocity keyword
(vlsr = "VLSR") LSR velocity keyword
(vsun = "VSUN") Epoch of solar motion keyword
(mode = "ql")

 
Profile Email
 Quote
fitz
 01/28/2008 09:03PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Sorry for the slow reply. The problem as you say is that the task doesn't handle the case where the UTMIDDLE (or UT) keywords when these are in ISO8901 format. However, it isn't technically a bug because the help page for the KEYWPARS pset explicitly mentions the value needs to be in HMS format. As a workaround you can reset the keywpars.utmiddle parameter to be an empty string and the HJD should be calculated from the UT and exposure time. I've also added this to the list of things for the next release (haven't got time just now to make the change) so both UT and UTMIDDLE can handle ISO8901. SETJD works only off of the date/time keywords and so isn't seeing utmiddle, but this affects any task using the KEYWPARS pset (i.e. rvcorrect as well).Cheers,
-Mike

 
Profile Email
 Quote
kstassun
 01/28/2008 09:03PM  
+----
Newbie

Status: offline


Registered: 02/18/2006
Posts: 9
Hello, I see that FXCOR in v2.14.1 of IRAF now accepts UT and UTMIDDLE keywords in the "new" fits format yyyy-mm-ssThh:mm:ss. A question I have is whether the FXCOR task uses *both* the date and the time from UTMIDDLE (if present), or if it still takes only the time from UTMIDDLE and the date from DATE-OBS? My concern is for cases where an exposure straddles 0h UT. For example, if the exposure started at 23:59:00 on 2010-01-01 and finished at 00:11:00 on 2010-01-02, then the mid-exposure time is at 00:05:00. In this case, the UTMIDDLE keyword will look like 2010-01-02T00:05:00 while the DATE-OBS keyword will look like 2010-01-01T23:59:00. If fxcor is using UTMIDDLE for the entire date/time stamp, then all is well. But if it is taking the time from UTMIDDLE and the date from DATE-OBS, then the date/time that fxcor is using will be off by 24 hours (because it will think it is 2010-01-01 from DATE-OBS and 00:05:00 from UTMIDDLE). For now, I am having FXCOR use DATE-OBS, UT, and EXPTIME keywords to compute the mid-exposure date/time, but it would be best if it would just take all of the date/time information encoded in UTMIDDLE if present. Thanks.

 
Profile Email
 Quote
fitz
 01/28/2008 09:03PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
You are right that the date is taken from the DATE-OBS keyword, and the time is (sometimes) taken from UTMIDDLE if it is present. However, I think the Revisions note is incorrect in saying the UTMIDDLE keyword uses the DATE-OBS style of string. Reading the code, if the UTMIDDLE keyword is present then the value is obtained as a double-precision, with a date like "2010-01-02T00:05:00" this would produce and error and the fallback is to use the UT and EXPTIME keywords to compute the midpoint UT time (the same happens if there is no UTMIDDLE). I do think there *is* a bug because the ut value computed is not checked for rollover of 24h. I'll modify the code for the next release to use UTMIDDLE to get the data and time if possible, and fix the problem with the rollover if not. Let me know if you need a new binary before then (and for which platform).

 
Profile Email
 Quote
kstassun
 01/28/2008 09:03PM  
+----
Newbie

Status: offline


Registered: 02/18/2006
Posts: 9
Thanks for the reply. A new binary (redhat) would be very much appreciated if/when it becomes available. In the meantime, do you see any problems in fxcor with the UT keyword being in the DATE-OBS format? In other words, is it only UTMIDDLE that apparently will not work with the new fits date/time string format? Thanks again.

 
Profile Email
 Quote
fitz
 01/28/2008 09:03PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
[quote:774e4640a0]Thanks for the reply. A new binary (redhat) would be very much appreciated if/when it becomes available. In the meantime, do you see any problems in fxcor with the UT keyword being in the DATE-OBS format? In other words, is it only UTMIDDLE that apparently will not work with the new fits date/time string format?[/quote:774e4640a0]UT in a DATE-OBS string format will only properly get the date and the start time of the observation; If the exposure time carries the midpoint past midnight then we still have the same 24hour problem you describe earlier.The good news is that I've put a new RV binary for redhat at https://iraf.net/ftp/pub/x_rv.e.RHUXJust download and install in iraf$noao/bin.redhat/x_rv.e This version fixes the rollover problem as well as allows UTMIDDLE to be in a DATE-OBS format where both the date and time are derived from the keyword value. If you still think there's a problem with the new binary please let me know, otherwise this is fixed for the next release.Cheers,
-Mike

 
Profile Email
 Quote
kstassun
 01/28/2008 09:03PM  
+----
Newbie

Status: offline


Registered: 02/18/2006
Posts: 9
Thanks so much! I have done a quick test, and it appears that fxcor is not able to compute the HJD if I only specify the utmiddle keyword. My keywpars is set up as below, which should work since the utmiddle has both the date and time. With the additional info of coordinates (ra, dec), and epoch, it should have all the information it needs. FYI, the utmiddle from the image header looks like this:
UTMIDDLE= '2010-02-14T03:55:15.99' / Mid-exposure timestampIt also does not work if I specify UT and EXPTIME in addition to UTMIDDLE. It still seems to require DATE-OBS, at which point it does appear to work.
FYI, here is the UT and DATE-OBS keywords from the image header:
UT = '2010-02-14T03:50:15.99' / UT of observation start
DATE-OBS= '2010-02-14T03:50:15.99' / UT of observation startJust to verify, I 'installed' the new binary by simply changing its name to 'x_rv.e', chmod to make it executable, and placing it in:
/usr/local/iraf/irafbin/noao.bin.redhat/
PACKAGE = rv
TASK = keywpars(ra = ra) Right Ascension keyword
(dec = dec) Declination keyword
(ut = ) UT of observation keyword
(utmiddl= utmiddle) UT of mid-point of observation keyword
(exptime= ) Exposure time keyword
(epoch = epoch) Epoch of observation keyword
(date_ob= ) Date of observation keyword

 
Profile Email
 Quote
   
Content generated in: 0.29 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login