BGlib.be.translators.beps_data_generator.FakeBEPSGenerator¶
- class BGlib.be.translators.beps_data_generator.FakeBEPSGenerator(*args, **kwargs)[source]¶
- Bases: - Translator- Methods - Build the loop coefficient matrix - Checks whether the provided file can be read by this translator. - no_bin- param h5_path:
- Desired path to write the new HDF5 file 
 - calc_loop_coef_mat(image_list)[source]¶
- Build the loop coefficient matrix - Parameters:
- image_list (list of numpy.ndarray) – Images that will be used to generate the coefficients 
- Returns:
- coef_mat – Array of loop coefficients 
- Return type:
 
 - static is_valid_file(file_path, *args, **kwargs)¶
- Checks whether the provided file can be read by this translator. - This basic function compares the file extension against the “extension” keyword argument. If the extension matches, this function returns True 
 - translate(h5_path, n_steps=32, n_bins=37, start_freq=300000.0, end_freq=350000.0, data_type='BEPSData', mode='DC modulation mode', field_mode='in and out-of-field', n_cycles=1, FORC_cycles=1, FORC_repeats=1, loop_a=3, loop_b=4, cycle_frac='full', image_folder='/home/runner/work/BGlib/BGlib/BGlib/be/translators/df_utils/beps_data_gen_images', bin_factor=None, bin_func=<function mean>, image_type='.tif', simple_coefs=False)[source]¶
- Parameters:
- h5_path (str) – Desired path to write the new HDF5 file 
- n_steps (uint, optional) – Number of voltage steps Default - 32 
- n_bins (uint, optional) – Number of frequency bins Default - 37 
- start_freq (float, optional) – Starting frequency in Hz Default - 300E+3 
- end_freq (float, optional) – Final freqency in Hz Default - 350E+3 
- data_type (str, optional) – Type of data to generate Options - ‘BEPSData’, ‘BELineData’ Default - ‘BEPSData’ 
- mode (str, optional) – Modulation mode to use when generating the data. Options - ‘DC modulation mode’, ‘AC modulation mode’ Default - ‘DC modulation mode’ 
- field_mode (str, optional) – Field mode Options - ‘in-field’, ‘out-of-field’, ‘in and out-of-field’ Default - ‘in and out-of-field’ 
- n_cycles (uint, optional) – Number of cycles Default - 1 
- FORC_cycles (uint, optional) – Number of FORC cycles Default - 1 
- FORC_repeats (uint, optional) – Number of FORC repeats Default - 1 
- loop_a (float, optional) – Loop coefficient a Default - 1 
- loop_b (float, optional) – Loop coefficient b 
- cycle_frac (str) – Cycle fraction parameter. Default - ‘full’ 
- image_folder (str) – Path to the images that will be used to generate the loop coefficients. There must be 11 images named ‘1.tif’, ‘2.tif’, …, ‘11.tif’ Default - pycroscopy.io.translators.df_utils.beps_gen_utils.beps_image_folder 
- bin_factor (array_like of uint, optional) – Downsampling factor for each dimension. Default is None. 
- bin_func (callable, optional) – Function which will be called to calculate the return value of each block. Function must implement an axis parameter, i.e. numpy.mean. Ignored if bin_factor is None. Default is numpy.mean. 
- image_type (str) – File extension of images to be read. Default ‘.tif’ 
- simple_coefs (bool) – Should a simpler coefficient generation be used. Ensures loops, but all loops are identical. Default False