MJD Ignored

Issue #46 resolved
David Thomas created an issue

In source/atmosphere/main.cpp we have these two lines.

if (readText::getKey(line, "tai", tai)) haveTai=1; if (readText::getKey(line, "tai", mjdstring)) haveMjdString=1;

It looks like the input tai is being overloaded, which might be the desired behavior. But CatSim produces instance catalogs from OpSim that have an input mjd that seems to be missed by PhoSim. For example in the sample instance catalog below the mjd would be ignored and hence the tai variable from PhoSim would be randomly sampled. This leads me to believe that maybe the first line above should be:

if (readText::getKey(line, "mjd", tai)) haveTai=1;

------------ sample instance catalog with mjd ------------

rightascension 121.7264306 declination 19.7934000 mjd 59937.2767680 altitude 40.0251834 azimuth 0.7611199 filter 2 rotskypos 119.7016550 dist2moon 164.5181273 moonalt -31.6124880 moondec -26.3137743 moonphase 1.3621760 moonra 286.4456660 nsnap 1 obshistid 43 rottelpos -60.1319206 seed 43 seeing 0.6678780 sunalt -29.5740187 vistime 15.0000000 object 4298102808580 121.650154 19.7183943 26.9280977 starSED/phoSimMLT/lte036-5.0-1.0a+0.4.BT-Settl.spec.gz 0 0 0 0 0 0 point none CCM 0.107417739 3.1

Comments (1)

  1. David Thomas reporter

    Nevermind, the lines below in phosim.py change 'mjd' to 'tai'.

    elif "mjd" in line: self.tai=lstr[1]

    ....

    if hasattr(self, 'tai'): pfile.write("tai %s\n" % self.tai)

  2. Log in to comment