foscat.FoCUS ============ .. py:module:: foscat.FoCUS Attributes ---------- .. autoapisummary:: foscat.FoCUS.TMPFILE_VERSION Classes ------- .. autoapisummary:: foscat.FoCUS.FoCUS Module Contents --------------- .. py:data:: TMPFILE_VERSION :value: 'V14_0' .. py:class:: 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) .. py:attribute:: TMPFILE_VERSION :value: 'V14_0' .. py:attribute:: P1_dic :value: None .. py:attribute:: P2_dic :value: None .. py:attribute:: isMPI :value: False .. py:attribute:: mask_thres :value: None .. py:attribute:: mask_norm :value: False .. py:attribute:: InitWave :value: None .. py:attribute:: mask_mask :value: None .. py:attribute:: mpi_size :value: 1 .. py:attribute:: mpi_rank :value: 0 .. py:attribute:: return_data :value: False .. py:attribute:: silent :value: True .. py:attribute:: use_median :value: False .. py:attribute:: kernel_smooth .. py:attribute:: padding_smooth .. py:attribute:: kernelR_conv .. py:attribute:: kernelI_conv .. py:attribute:: padding_conv .. py:attribute:: down .. py:attribute:: up .. py:attribute:: TEMPLATE_PATH :value: None .. py:attribute:: number_of_loss :value: 0 .. py:attribute:: history .. py:attribute:: nlog :value: 0 .. py:attribute:: padding :value: 'SAME' .. py:attribute:: use_2D :value: False .. py:attribute:: use_1D :value: False .. py:attribute:: all_type :value: 'float32' .. py:attribute:: BACKEND :value: 'torch' .. py:attribute:: all_bk_type :value: Ellipsis .. py:attribute:: all_cbk_type :value: Ellipsis .. py:attribute:: gpulist .. py:attribute:: ngpu :value: 1 .. py:attribute:: rank :value: 0 .. py:attribute:: gpupos .. py:attribute:: NORIENT :value: 4 .. py:attribute:: LAMBDA :value: 1.2 .. py:attribute:: slope :value: 1.0 .. py:attribute:: R_off :value: 1 .. py:attribute:: ww_Real .. py:attribute:: ww_Imag .. py:attribute:: ww_CNN_Transpose .. py:attribute:: ww_CNN .. py:attribute:: X_CNN .. py:attribute:: Y_CNN .. py:attribute:: Z_CNN .. py:attribute:: Idx_CNN .. py:attribute:: Idx_WCNN .. py:attribute:: filters_set .. py:attribute:: edge_masks .. py:attribute:: KERNELSZ :value: 3 .. py:attribute:: Idx_Neighbours .. py:attribute:: w_smooth .. py:attribute:: pix_interp_val .. py:attribute:: weight_interp_val .. py:attribute:: ring2nest .. py:attribute:: ampnorm .. py:attribute:: loss .. py:attribute:: dtype_dcode_map .. py:attribute:: dtype_code_map .. py:method:: get_dtype_code(dtype) .. py:method:: get_type() .. py:method:: get_mpi_type() .. py:method:: conv_to_FoCUS(x, axis=0) .. py:method:: diffang(a, b) .. py:method:: corr_idx_wXX(x, y) .. py:method:: calc_indices_convol(nside, kernel, rotation=None) .. py:method:: save_index(filepath, data, offset=0, count=None) 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) .. py:method:: read_index(filepath, offset=0, count=None) 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 .. py:method:: healpix_layer(im, ww, indices=None, weights=None) .. py:method:: get_rank() .. py:method:: get_size() .. py:method:: barrier() .. py:method:: toring(image, axis=0) .. py:method:: ud_grade(im, j, axis=0, cell_ids=None, nside=None) .. py:method:: ud_grade_2(im, axis=0, cell_ids=None, nside=None, max_poll=False) .. py:method:: up_grade(im, nout, axis=-1, nouty=None, cell_ids=None, o_cell_ids=None, force_init_index=False, nside=None) .. py:method:: fill_1d(i_arr, nullval=0) .. py:method:: fill_2d(i_arr, nullval=0) .. py:method:: fill_healpy(i_map, nmax=10, nullval=hp.UNSEEN) .. py:method:: ud_grade_1d(im, nout, axis=0) .. py:method:: up_grade_2_1d(im, axis=0) .. py:method:: convol_1d(im, axis=0) .. py:method:: smooth_1d(im, axis=0) .. py:method:: up_grade_1d(im, nout, axis=0) .. py:method:: init_index(nside, kernel=-1, cell_ids=None, spin=0) .. py:method:: init_index_cnn(nside, NORIENT=4, kernel=-1, cell_ids=None) .. py:method:: swapaxes(x, axis1, axis2) .. py:method:: masked_mean(x, mask, rank=0, calc_var=False) .. py:method:: reduce_dim(x, axis=0) .. py:method:: conv2d(image, ww, axis=0) .. py:method:: diff_data(x, y, is_complex=True, sigma=None) .. py:method:: convol(in_image, axis=0, cell_ids=None, nside=None, spin=0) .. py:method:: smooth(in_image, axis=0, cell_ids=None, nside=None, spin=0) .. py:method:: get_kernel_size() .. py:method:: get_nb_orient() .. py:method:: get_ww(nside=1) .. py:method:: plot_ww()