Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complex impedance fixes #429

Merged
merged 7 commits into from
Jul 17, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions sodetlib/operations/complex_impedance.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def new_ci_dset(S, cfg, bands, chans, freqs, run_kwargs=None, ob_path=None,
IndexAxis('steps', count=nsteps),
IndexAxis('biaslines', count=NBGS),
)
ds.wrap('meta', sdl.dict_to_am(sdl.get_metadata(S, cfg)))
ds.wrap('meta', sdl.dict_to_am(sdl.get_metadata(S, cfg), skip_bad_types=True))
ds.meta.wrap('g3_dir', cfg.sys['g3_dir'])
if run_kwargs is not None:
ds.wrap('run_kwargs', sdl.dict_to_am(run_kwargs))
Expand Down Expand Up @@ -251,7 +251,7 @@ def analyze_tods(ds, bgs=None, tod=None, arc=None, show_pb=True):
if i == 0:
ds._Ibias_dc[bg] = np.mean(seg.biases[bg])
ds._Ibias[bg] = 0.5 * np.ptp(seg.biases[bg])
ds._res_freqs[chmap] = seg.ch_info.frequency
ds._res_freqs[chmap] = seg.ch_info.res_frequency

ds._Ites[chmap, i] = seg.Ites
pb.update()
Expand Down Expand Up @@ -549,8 +549,6 @@ def take_complex_impedance(

pb = tqdm(total=len(freqs)*len(bgs), disable=False)
try:
S.set_downsample_factor(1)
S.set_filter_disable(1)
sdl.set_current_mode(S, bgs, 1)
tickle_voltage /= S.high_low_current_ratio

Expand All @@ -560,7 +558,9 @@ def take_complex_impedance(
channel_mask = ds.bands[m] * S.get_number_channels() + ds.channels[m]

ds.sids[bg] = sdl.stream_g3_on(
S, channel_mask=channel_mask, subtype='complex_impedance')
S, channel_mask=channel_mask, subtype='complex_impedance',
downsample_factor=1, filter_disable=True
)
for j, freq in enumerate(freqs):
meas_time = min(1./freq * nperiods, max_meas_time)
S.log(f"Tickle with bg={bg}, freq={freq}")
Expand Down
Loading