Open rjtayl opened 1 month ago
Share your spec_example_exp.yaml? yaml.load() works for me, but in my setup it is called via experiment.py: L 132 It does not call the L195 version. It should at least be broken if this config is not updated
Currently looks like this, pretty sure this is just from your pull request.
# he6_cres_spec_sims example config file.
# if sim_daq: you must specify number acquisitions and acquisition time and event rates.
Settings:
rand_seed: 717
sim_daq: True #If true will simulate daq and create spec file, if false no need to fill out daq section
Physics:
events_to_simulate : 10 #if sim_daq==True will instead calculate appropriate event rate for each spec file
betas_to_simulate : 2
beta_rate: 1.5e+6
freq_acceptance_low: 18.0e+9
freq_acceptance_high: 19.1e+9
#energy_spectrum:
# beta_source: "He6"
energy:
#distribution: "dirac"
#value: 2.4e+5
distribution: "beta_decay"
isotope: "He6"
b: 0
rho:
distribution: "uniform_annulus"
rho_min : 0.0
rho_max : 5.78e-3
z:
distribution: "uniform"
low : -2.5e-3
high : 2.5e-3
min_theta : 89.0
max_theta : 90.0
EventBuilder:
main_field : 1.700468
trap_current : .1
decay_cell_radius : 5.78e-3
SegmentBuilder:
segment_length:
distribution: "exponential"
tau: 1.0e-3
start_time:
distribution: "uniform"
low : 0
high : 0.006
energy_loss:
distribution: "normal"
mean : 14
sigma : 5
scattering_angle:
distribution: "fixed"
value: 0.0
jump_num_max: 3
verbose: True
BandBuilder:
sideband_num: 0
frac_total_segment_power_cut : 0.01
harmonic_sidebands: True
magnetic_modulation: False
TrackBuilder:
run_length: 60.0e-4
DMTrackBuilder:
mixer_freq: 17.9e+9
Daq:
n_files: 2
spec_length: .006
freq_bw: 1.2e+9
freq_bins: 4096
roach_avg: 2
roach_inverted_flag: True # this effectively deletes every other file when roach_avg=2
requant_gain: 17
noise_file_gain: 17 #requant gain that the noise profile was taken with
build_labels: False
gain_noise_csv_path: "./config_files/base_gain_noise.csv"
spec_prefix: "SNR_dev"
spec_suffix: "spec"
threshold_factor: 9
Attempted fix: https://github.com/Helium6CRES/he6-cres-spec-sims/pull/13 I am unsure how this was intended to work - I think it has been broken for a while?
I think with our last pull we broke the experiment.load. I suspect this has to do with the changes to the yaml file but haven't had a chance to look into it yet.
I get this error when trying to use the function in cell 7 of the example ipynb:
expected output is