Skip to content

Commit

Permalink
dfmux relative imports
Browse files Browse the repository at this point in the history
  • Loading branch information
arahlin committed Mar 24, 2024
1 parent 022bfc3 commit cacf330
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion dfmux/python/Housekeeping.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from spt3g import core
from spt3g.dfmux import DfMuxHousekeepingMap, HkBoardInfo, HkMezzanineInfo, HkModuleInfo, HkChannelInfo, DfMuxWiringMap, DfMuxChannelMapping

from spt3g.dfmux.IceboardConversions import convert_TF
from .TuberClient import TuberClient
import socket, struct, time
import numpy
Expand Down
10 changes: 5 additions & 5 deletions dfmux/python/unittransforms.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import numpy
from spt3g import core
from spt3g.dfmux import HousekeepingForBolo
from .Housekeeping import HousekeepingForBolo

# Transfer functions for 3G and SPTpol boards
from spt3g.dfmux import IceboardConversions
from .IceboardConversions import convert_TF, convert_adc_samples
from .wtl_ConvertUtils import convert_squid, convert_demod, convert_mb

def counts_to_rms_amps(wiringmap, hkmap, bolo, system, tf=None):
boardhk, mezzhk, modhk, chanhk = HousekeepingForBolo(hkmap, wiringmap, bolo, True)

if system == 'ICE':
if chanhk.dan_streaming_enable:
tf_I = IceboardConversions.convert_TF(modhk.nuller_gain, target='nuller', custom_TF=tf, unit='RAW', frequency=chanhk.carrier_frequency/core.G3Units.Hz)
tf_I = convert_TF(modhk.nuller_gain, target='nuller', custom_TF=tf, unit='RAW', frequency=chanhk.carrier_frequency/core.G3Units.Hz)
else:
tf_V = IceboardConversions.convert_adc_samples('Streamer')
tf_V = convert_adc_samples('Streamer')
tf_I = tf_V/modhk.squid_transimpedance
if chanhk.carrier_frequency != 0:
tf_I /= numpy.sqrt(2) # Use RMS amps
Expand Down Expand Up @@ -41,7 +41,7 @@ def bolo_bias_voltage_rms(wiringmap, hkmap, bolo, system, tf=None):
boardhk, mezzhk, modhk, chanhk = HousekeepingForBolo(hkmap, wiringmap, bolo, True)

if system == 'ICE':
tf_V = IceboardConversions.convert_TF(modhk.carrier_gain, target='carrier', custom_TF=tf, unit='NORMALIZED', frequency=chanhk.carrier_frequency/core.G3Units.Hz)
tf_V = convert_TF(modhk.carrier_gain, target='carrier', custom_TF=tf, unit='NORMALIZED', frequency=chanhk.carrier_frequency/core.G3Units.Hz)
volts = tf_V * chanhk.carrier_amplitude * core.G3Units.V
if chanhk.carrier_frequency != 0:
volts /= numpy.sqrt(2) # Use RMS amps
Expand Down

0 comments on commit cacf330

Please sign in to comment.