Skip to content

Commit

Permalink
Merge pull request #2 from jjpopski/master
Browse files Browse the repository at this point in the history
velocity scale, azimut and elevation bugs patched
  • Loading branch information
flyingfrog81 committed Apr 29, 2016
2 parents 057078e + 50bbae5 commit 301b421
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/discosscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ def _load_metadata(self, section, polarization, index):
format = "mjd",
scale = "utc",
location = self.location)
self.azimut=subscan["DATA TABLE"].data["az"][0]
self.elevation=subscan["DATA TABLE"].data["el"][0]

self.record_time = Time(subscan[0].header["DATE"], scale="utc")
self.antenna = subscan[0].header["ANTENNA"]
self.ScanID = subscan[0].header["SCANID"]
Expand Down Expand Up @@ -190,8 +193,8 @@ def write_observation(self, scan_cycle, first_subscan_index):
#FIXME: get sidereal time right
#obs.head.gen.st = observation_time.sidereal_time()
obs.head.gen.st = 0.
obs.head.gen.az = self.ra
obs.head.gen.el = self.dec
obs.head.gen.az = self.azimut # unit radians
obs.head.gen.el = self.elevation # radians
obs.head.gen.tau = 0.
#FIXME: should we read antenna temperature?
obs.head.gen.time = data["on"][0]["integration"]
Expand All @@ -218,7 +221,7 @@ def write_observation(self, scan_cycle, first_subscan_index):
obs.head.spe.foff = self.offsetFrequencyAt0
logger.debug("offset at 0 %f" % self.offsetFrequencyAt0)

obs.head.spe.vres = (self.freq_resolution / self.central_frequency) * CLIGHT # frequency resolution must have the same unity like the central_frequency
obs.head.spe.vres = - (self.freq_resolution / self.central_frequency) * CLIGHT # frequency resolution must have the same unity like the central_frequency
obs.head.spe.voff = self.summary["velocity"]["vrad"]
obs.head.spe.bad = 0.
obs.head.spe.image = 0.
Expand Down

0 comments on commit 301b421

Please sign in to comment.