Skip to content
Snippets Groups Projects
Commit d162498d authored by Jan Niklas Reinhardt's avatar Jan Niklas Reinhardt Committed by Jean-Baptiste Bayle
Browse files

Correct TDIR tone and tps_mprs and adjust namings

parent 1390b1fe
No related branches found
No related tags found
1 merge request!141Resolve "Missing TPS deviations from TPS in the TCB timer deviations"
......@@ -919,7 +919,7 @@ class Instrument:
)
t = self.physics_et
self.the_wrt_tps = \
self.the_wrt_tps_local = \
self.clock_offsets \
+ self.clock_freqoffsets * t \
+ self.clock_freqlindrifts * t**2 / 2 \
......@@ -927,7 +927,7 @@ class Instrument:
+ self.integrated_clock_noise_fluctuations
t = self.physics_et_withinitial
self.the_wrt_tcb_local_withinitial = \
self.the_wrt_tcb_withinitial = \
self.tps_wrt_tcb \
+ self.clock_offsets \
+ ForEachSC(lambda sc:
......@@ -938,14 +938,10 @@ class Instrument:
+ self.tps_wrt_tcb * self.clock_noise_fluctuations_withinitial \
+ self.integrated_clock_noise_fluctuations_withinitial
self.the_wrt_tcb_local = self.the_wrt_tcb_local_withinitial.transformed(
lambda _, x: x if np.isscalar(x) else x[self.initial_telemetry_physics_size:]
)
logger.debug("Computing MOC time correlations")
physics_to_telemetry = lambda _, x: x[::self.physics_upsampling * self.telemetry_downsampling]
self.moc_time_correlations = self.tcb_sync_noises \
+ self.the_wrt_tcb_local_withinitial.transformed(physics_to_telemetry)
+ self.the_wrt_tcb_withinitial.transformed(physics_to_telemetry)
## TDIR tone
......@@ -953,7 +949,7 @@ class Instrument:
0 if self.tdir_tone_amplitudes[mosa] == 0 \
else self.tdir_tone_amplitudes[mosa] * np.sin(
2 * np.pi * self.tdir_tone_frequencies[mosa]
* (self.physics_et + self.the_wrt_tcb_local[mosa[0]])
* (self.physics_et + self.the_wrt_tps_local[mosa[0]])
+ self.tdir_tone_initial_phases[mosa]
)
)
......@@ -1014,9 +1010,9 @@ class Instrument:
- (self.central_freq + self.local_usb_offsets) * self.gws \
- (self.central_freq + self.local_usb_offsets) * self.local_ttls / c
logger.debug("Propagating local THEs with respect to TCB to distant MOSAs")
self.the_wrt_tcb_distant = \
self.the_wrt_tcb_local.for_each_mosa().distant() \
logger.debug("Propagating local THEs with respect to TPS to distant MOSAs")
self.the_wrt_tps_distant = \
self.the_wrt_tps_local.for_each_mosa().distant() \
.transformed(lambda mosa, x: self.interpolate(x, -self.pprs[mosa])
- self.pprs[mosa]
)
......@@ -1104,7 +1100,7 @@ class Instrument:
## Measured pseudo-ranging on TPS grid (high-frequency)
logger.info("Computing measured pseudo-ranges on TPS")
self.tps_mprs = self.the_wrt_tcb_local - self.the_wrt_tcb_distant \
self.tps_mprs = self.the_wrt_tps_local - self.the_wrt_tps_distant \
+ self.ranging_noises
......@@ -1225,7 +1221,7 @@ class Instrument:
## Sampling beatnotes, DWS measurements, and measured pseudo-ranges to THE grid
logger.info("Inverting THEs with respect to TPS")
self.inverse_the_wrt_tps = self.the_wrt_tps \
self.inverse_the_wrt_tps = self.the_wrt_tps_local \
.transformed(lambda sc, x: self.invert_timer_deviations(x, sc))
self.timestamped = \
......@@ -1928,8 +1924,7 @@ class Instrument:
self.local_usb_fluctuations.write(hdf5, 'local_usb_fluctuations')
logger.debug("Writing local timer deviations to '%s'", output)
self.the_wrt_tcb_local.write(hdf5, 'the_wrt_tcb_local')
self.the_wrt_tcb_local_withinitial.write(hdf5, 'the_wrt_tcb_local_withinitial')
self.the_wrt_tcb_withinitial.write(hdf5, 'the_wrt_tcb_withinitial')
logger.debug("Writing tilt-to-length couplings to '%s'", output)
self.local_ttls.write(hdf5, 'local_ttls')
......@@ -1941,8 +1936,8 @@ class Instrument:
self.distant_usb_offsets.write(hdf5, 'distant_usb_offsets')
self.distant_usb_fluctuations.write(hdf5, 'distant_usb_fluctuations')
logger.debug("Writing propagated timer deviations to '%s'", output)
self.the_wrt_tcb_distant.write(hdf5, 'the_wrt_tcb_distant')
logger.debug("Writing propagated THEs with respect to TCB to '%s'", output)
self.the_wrt_tps_distant.write(hdf5, 'the_wrt_tcb_distant')
logger.debug("Writing propagated adjacent beams to '%s'", output)
self.adjacent_carrier_offsets.write(hdf5, 'adjacent_carrier_offsets')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment