wf_psf.psf_models.tf_modules module
- class wf_psf.psf_models.tf_modules.TF_Zernike_mono_PSF(phase_N, lambda_obs, obscurations, zernike_maps, output_dim=64, name=None)[source]
Bases:
ModuleBuild a monochromatic PSF from zernike coefficients.
Following a Zernike model.
- Attributes:
nameReturns the name of this module as passed or determined in the ctor.
name_scopeReturns a tf.name_scope instance for this class.
non_trainable_variablesSequence of non-trainable variables owned by this module and its submodules.
submodulesSequence of all sub-modules.
trainable_variablesSequence of trainable variables owned by this module and its submodules.
variablesSequence of variables owned by this module and its submodules.
Methods
__call__(z_coeffs)Call self as a function.
with_name_scope(method)Decorator to automatically enter the module name scope.
- class wf_psf.psf_models.tf_modules.TF_build_phase(phase_N, lambda_obs, obscurations, name=None)[source]
Bases:
ModuleBuild complex phase map from OPD map.
- Attributes:
nameReturns the name of this module as passed or determined in the ctor.
name_scopeReturns a tf.name_scope instance for this class.
non_trainable_variablesSequence of non-trainable variables owned by this module and its submodules.
submodulesSequence of all sub-modules.
trainable_variablesSequence of trainable variables owned by this module and its submodules.
variablesSequence of variables owned by this module and its submodules.
Methods
__call__(opd)Build the phase from the opd.
apply_obscurations(phase)Multiply element-wise with the obscurations.
opd_to_phase(opd)Convert from opd to phase.
with_name_scope(method)Decorator to automatically enter the module name scope.
zero_padding_diffraction(no_pad_phase)Pad with zeros corresponding to the required lambda.
- class wf_psf.psf_models.tf_modules.TF_fft_diffract(output_dim=64, output_Q=2, name=None)[source]
Bases:
ModuleDiffract the wavefront into a monochromatic PSF.
- Parameters:
- Attributes:
nameReturns the name of this module as passed or determined in the ctor.
name_scopeReturns a tf.name_scope instance for this class.
non_trainable_variablesSequence of non-trainable variables owned by this module and its submodules.
submodulesSequence of all sub-modules.
trainable_variablesSequence of trainable variables owned by this module and its submodules.
variablesSequence of variables owned by this module and its submodules.
Methods
__call__(input_phase)Calculate the normalized PSF from the padded phase array.
tf_crop_img(image, output_crop_dim)Crop images with tf methods.
with_name_scope(method)Decorator to automatically enter the module name scope.
crop_img
normalize_psf
- class wf_psf.psf_models.tf_modules.TF_mono_PSF(phase_N, lambda_obs, obscurations, output_Q, output_dim=64, name=None)[source]
Bases:
ModuleCalculate a monochromatic PSF from an OPD map.
- Attributes:
nameReturns the name of this module as passed or determined in the ctor.
name_scopeReturns a tf.name_scope instance for this class.
non_trainable_variablesSequence of non-trainable variables owned by this module and its submodules.
submodulesSequence of all sub-modules.
trainable_variablesSequence of trainable variables owned by this module and its submodules.
variablesSequence of variables owned by this module and its submodules.
Methods
__call__(opd)Call self as a function.
with_name_scope(method)Decorator to automatically enter the module name scope.
- class wf_psf.psf_models.tf_modules.TF_zernike_OPD(zernike_maps, name=None)[source]
Bases:
ModuleTurn zernike coefficients into an OPD.
Will use all of the Zernike maps provided. Both the Zernike maps and the Zernike coefficients must be provided.
- Parameters:
zernike_maps (Tensor (Num_coeffs, x_dim, y_dim)) –
z_coeffs (Tensor (num_star, num_coeffs, 1, 1)) –
- Returns:
opd
- Return type:
Tensor (num_star, x_dim, y_dim)
- Attributes:
nameReturns the name of this module as passed or determined in the ctor.
name_scopeReturns a tf.name_scope instance for this class.
non_trainable_variablesSequence of non-trainable variables owned by this module and its submodules.
submodulesSequence of all sub-modules.
trainable_variablesSequence of trainable variables owned by this module and its submodules.
variablesSequence of variables owned by this module and its submodules.
Methods
__call__(z_coeffs)Call self as a function.
with_name_scope(method)Decorator to automatically enter the module name scope.