njcuk9999 / lbl

Line by line code for radial velocity
MIT License
16 stars 3 forks source link

dates in lbl rdb files #9

Closed clairem789 closed 1 year ago

clairem789 commented 3 years ago

I just noticed that, although the lbl*rdb files have a column name "rjd" for the date, the content is close to the MJD keywords in the lbl.fits files. rjd is expected to be BJD-2400000. So there is a ~0.5 day difference between MJD and rjd. I asked Pascal, who should have seen a problem when fitting the literature values for planets in DACE, but for some reason it doesn't seem to be an issue. So I'm confused. The lbl code says all over "MJD" so I guess this date in the rdb files really corresponds to some of the MJD keywords, but I actually don't seem to find which one. One example:

in lbl_GL411_GL411.rdb file 2374981o has "rjd" = 58528.62197768781

while dfits ../lblrv/GL411_GL411/2374981o*|grep JD has no corresponing value (about 600s apart from MJDATE): MJDATE = 58528.6153547 / Modified Julian Date at start of observation MJD-OBS = 58528.6153547 / Modified Julian Date at start of observation MJDEND = 58528.6164779 / Modified Julian Date at end of observation TCSMJD = 58528.6152604 / TCS MJD MJDMID = 58528.61612320672 / Mid Observation time [mjd] BJD = 2458529.121977688 / Barycentric Julian data calc. in BERVSRCE

Can you please clarify?

Sorry if this is a known issue.

njcuk9999 commented 3 years ago

Hi Claire,

Yer this may be a bug, I've looked at the code (here)

So the rjd column is currently is "BJD" from the header (just converted to MJD) it is definitely missing the 0.5 day difference

If "BJD" doesn't work (or is missing) it defaults to the MJDMID (again without the 0.5 day)

So from above it is:

 rjd = "BJD" - 2400000.5 = 2458529.121977688 - 2400000.5 = 58528.62197768781   (the value from your rdb file)

So you say ~0.5 what is the actual equation to go from:

If this link is correct

rjd = "BJD" - 2440000.0

and

rjd = "MJDMID" + 2400000.5 - 2440000.0

This seems to be a factor of -39999.5 out - so is there a typo in this link?

I will correct both and update the version of LBL

Note we never use

njcuk9999 commented 3 years ago

Okay looking at this source it is just 0.5

rjd = "BJD" - 2400000 

and

rjd = "MJDMID" + 2400000.5 - 2400000 = "MJDMID" + 0.5

Do you agree?

clairem789 commented 3 years ago

yes totally, the reduced JD, rjd, is "BJD" - 2400000