@@ -377,7 +377,7 @@ def translate(self, file_path, show_plots=True, save_plots=True,
377
377
UDVS_labs = ['step_num' , 'dc_offset' , 'ac_amp' , 'wave_type' , 'wave_mod' , 'be-line' ]
378
378
UDVS_units = ['' , 'V' , 'A' , '' , '' , '' ]
379
379
UDVS_mat = np .array ([1 , 0 , parm_dict ['BE_amplitude_[V]' ], 1 , 1 , 1 ],
380
- dtype = np . float32 ).reshape (1 , len (UDVS_labs ))
380
+ dtype = float ).reshape (1 , len (UDVS_labs ))
381
381
382
382
old_spec_inds = np .vstack ((np .arange (tot_bins , dtype = INDICES_DTYPE ),
383
383
np .zeros (tot_bins , dtype = INDICES_DTYPE )))
@@ -396,20 +396,20 @@ def translate(self, file_path, show_plots=True, save_plots=True,
396
396
band_width = parm_dict ['BE_band_width_[Hz]' ] * (0.5 - parm_dict ['BE_band_edge_trim' ])
397
397
st_f = parm_dict ['BE_center_frequency_[Hz]' ] - band_width
398
398
en_f = parm_dict ['BE_center_frequency_[Hz]' ] + band_width
399
- bin_freqs = np .linspace (st_f , en_f , bins_per_step , dtype = np . float32 )
399
+ bin_freqs = np .linspace (st_f , en_f , bins_per_step , dtype = float )
400
400
401
401
if verbose :
402
402
print ('\t Generating BE arrays of length: '
403
403
'{}' .format (bins_per_step ))
404
404
bin_inds = np .zeros (shape = bins_per_step , dtype = np .int32 )
405
405
bin_FFT = np .zeros (shape = bins_per_step , dtype = np .complex64 )
406
- ex_wfm = np .zeros (shape = bins_per_step , dtype = np . float32 )
406
+ ex_wfm = np .zeros (shape = bins_per_step , dtype = float )
407
407
408
408
# Forcing standardized datatypes:
409
409
bin_inds = np .int32 (bin_inds )
410
- bin_freqs = np . float32 (bin_freqs )
410
+ bin_freqs = float (bin_freqs )
411
411
bin_FFT = np .complex64 (bin_FFT )
412
- ex_wfm = np . float32 (ex_wfm )
412
+ ex_wfm = float (ex_wfm )
413
413
414
414
self .FFT_BE_wave = bin_FFT
415
415
@@ -711,8 +711,8 @@ def _read_beps_data(self, path_dict, udvs_steps, mode, add_pixel=False):
711
711
take_conjugate = requires_conjugate (rand_spectra , cores = self ._cores )
712
712
713
713
self .mean_resp = np .zeros (shape = (self .h5_raw .shape [1 ]), dtype = np .complex64 )
714
- self .max_resp = np .zeros (shape = (self .h5_raw .shape [0 ]), dtype = np . float32 )
715
- self .min_resp = np .zeros (shape = (self .h5_raw .shape [0 ]), dtype = np . float32 )
714
+ self .max_resp = np .zeros (shape = (self .h5_raw .shape [0 ]), dtype = float )
715
+ self .min_resp = np .zeros (shape = (self .h5_raw .shape [0 ]), dtype = float )
716
716
717
717
numpix = self .h5_raw .shape [0 ]
718
718
"""
@@ -945,7 +945,7 @@ def _read_secondary_channel(self, h5_meas_group, aux_file_path):
945
945
h5_pos_vals = self .h5_raw .h5_pos_vals ,
946
946
h5_spec_inds = h5_current_spec_inds ,
947
947
h5_spec_vals = h5_current_spec_values ,
948
- dtype = np . float32 , # data type / precision
948
+ dtype = float , # data type / precision
949
949
main_dset_attrs = {'IO_rate' : 4E+6 , 'Amplifier_Gain' : 9 },
950
950
verbose = self ._verbose )
951
951
@@ -961,7 +961,7 @@ def _read_secondary_channel(self, h5_meas_group, aux_file_path):
961
961
spectral_len = spectral_len // 2
962
962
963
963
# calculate the # positions that can be stored in memory in one go.
964
- b_per_position = np .float32 ( 0 ).itemsize * spectral_len
964
+ b_per_position = np .dtype ( 'float32' ).itemsize * spectral_len
965
965
966
966
max_pos_per_read = int (np .floor ((get_available_memory ()) / b_per_position ))
967
967
@@ -1565,7 +1565,7 @@ def translate_val(target, strvals, numvals):
1565
1565
'wave_type' , 'wave_mod' , 'in-field' ,
1566
1566
'out-of-field' ]
1567
1567
UD_VS_table_unit = ['' , 'V' , 'A' , '' , '' , 'V' , 'V' ]
1568
- udvs_table = np .zeros (shape = (num_VS_steps , 7 ), dtype = np . float32 )
1568
+ udvs_table = np .zeros (shape = (num_VS_steps , 7 ), dtype = float )
1569
1569
1570
1570
udvs_table [:, 0 ] = np .arange (0 , num_VS_steps ) # Python base 0
1571
1571
udvs_table [:, 1 ] = UD_dc_vec
@@ -1606,7 +1606,7 @@ def translate_val(target, strvals, numvals):
1606
1606
UD_dc_vec = VS_offset * np .ones (num_VS_steps )
1607
1607
UD_VS_table_label = ['step_num' , 'dc_offset' , 'ac_amp' , 'wave_type' , 'wave_mod' , 'forward' , 'reverse' ]
1608
1608
UD_VS_table_unit = ['' , 'V' , 'A' , '' , '' , 'A' , 'A' ]
1609
- udvs_table = np .zeros (shape = (num_VS_steps , 7 ), dtype = np . float32 )
1609
+ udvs_table = np .zeros (shape = (num_VS_steps , 7 ), dtype = float )
1610
1610
udvs_table [:, 0 ] = np .arange (1 , num_VS_steps + 1 )
1611
1611
udvs_table [:, 1 ] = UD_dc_vec
1612
1612
udvs_table [:, 2 ] = vs_amp_vec
0 commit comments