foscat.FoCUS#
Attributes#
Classes#
Module Contents#
- foscat.FoCUS.TMPFILE_VERSION = 'V14_0'#
- class foscat.FoCUS.FoCUS(NORIENT=4, LAMBDA=1.2, KERNELSZ=3, slope=1.0, all_type='float32', nstep_max=20, padding='SAME', gpupos=0, mask_thres=None, mask_norm=False, isMPI=False, TEMPLATE_PATH=None, BACKEND='torch', use_2D=False, use_1D=False, return_data=False, DODIV=False, use_median=False, InitWave=None, silent=True, mpi_size=1, mpi_rank=0)[source]#
- TMPFILE_VERSION = 'V14_0'#
- P1_dic = None#
- P2_dic = None#
- isMPI = False#
- mask_thres = None#
- mask_norm = False#
- InitWave = None#
- mask_mask = None#
- mpi_size = 1#
- mpi_rank = 0#
- return_data = False#
- silent = True#
- use_median = False#
- kernel_smooth#
- padding_smooth#
- kernelR_conv#
- kernelI_conv#
- padding_conv#
- down#
- up#
- TEMPLATE_PATH = None#
- number_of_loss = 0#
- history#
- nlog = 0#
- padding = 'SAME'#
- use_2D = False#
- use_1D = False#
- all_type = 'float32'#
- BACKEND = 'torch'#
- all_bk_type = Ellipsis#
- all_cbk_type = Ellipsis#
- gpulist#
- ngpu = 1#
- rank = 0#
- gpupos#
- NORIENT = 4#
- LAMBDA = 1.2#
- slope = 1.0#
- R_off = 1#
- ww_Real#
- ww_Imag#
- ww_CNN_Transpose#
- ww_CNN#
- X_CNN#
- Y_CNN#
- Z_CNN#
- Idx_CNN#
- Idx_WCNN#
- filters_set#
- edge_masks#
- KERNELSZ = 3#
- Idx_Neighbours#
- w_smooth#
- pix_interp_val#
- weight_interp_val#
- ring2nest#
- ampnorm#
- loss#
- dtype_dcode_map#
- dtype_code_map#
- save_index(filepath, data, offset=0, count=None)[source]#
Save an N-dimensional NumPy array with shape (N, …) to binary file. A 12x int64 header is written, describing dtype and shape beyond axis 0.
Header layout (12 x int64): [0] = dtype code (0=int64, 1=int32, 2=float32, 3=float64, 4=complex64, 5=complex128) [1] = number of extra dimensions (i.e., data.ndim - 1) [2:12] = shape[1:] padded with zeros
Parameters: - filepath: target binary file path - data: NumPy array with shape (N, …) - offset: number of items to skip on axis 0 - count: number of items to write on axis 0 (default: rest of the array)
- read_index(filepath, offset=0, count=None)[source]#
Load a NumPy array from a binary file with a 12x int64 header.
Header layout: [0] = dtype code [1] = number of extra dimensions (D) [2:2+D] = shape[1:] of each sample (shape after axis 0)
Parameters: - filepath: path to the binary file - offset: number of samples to skip on axis 0 - count: number of samples to read (default: all remaining)
Returns: - data: NumPy array with shape (count, …) and correct dtype