ISPy.inv package
Submodules
ISPy.inv.disambiguation module
- ISPy.inv.disambiguation.field_test(amp=1.0, nx=50, ny=50)
Creates a test magnetic field 2D array
- Parameters:
amp (float) – Maximum strength of the magnetic field
nx, ny (integer) – Size of the map in each dimension
- ISPy.inv.disambiguation.get_acute_angle(azimuth, reference, value=90.0)
It outputs the closest azimuth to the reference (adding 180 degrees)
- Parameters:
azimuth (ndarray) – 2D array of dimensions (ny, nx) in degrees
reference (float) – Reference angle to rotate the azimuth
value (float) – Threshold to be applied to find the closest azimuth
- Returns:
2D array of dimensions (nx,ny) with the closest azimuth to the reference
- Return type:
ndarray
- ISPy.inv.disambiguation.potential_extrapolation(Bz, zz=[0.0], pixel=[0.1, 0.1])
Computes a potential extrapolation from the observed vertical field. It uses a fast implementation in the Fourier space.
- Parameters:
Bz (ndarray) – 2D array of dimensions (ny, nx) in Gauss
zz (ndarray) – 1D array of dimensions (nz) in Mm
pixel (ndarray) – 1D array of dimensions (2) with the pixel size in arcsec
- Returns:
3D array of dimensions (nx,ny,nz) with the magnetic field vector
- Return type:
ndarray
Example
>>> a = readimage('Bz.fits') >>> Bvector = potential_extrapolation(Bz, zz=[0.0,1.0], pixel=[0.1,0.1])
- Authors:
Ported from the IDL /ssw/packages/nlfff/idl/FFF.pro (by Yuhong Fan) by Carlos Diaz (ISP-SU 2020) and simplified to the vertical case.
- ISPy.inv.disambiguation.smooth_azimuth(azimap, value)
Smoothing of an azimuth map with values in the range [0, pi]
- Parameters:
azimap (ndarray) – magnetic field azimuth of shape (1,), (nx) or (ny, nx)
value (float) – Standard deviation for Gaussian kernel
Module contents
Tools and scripts for pre- and post-processing inversion input/output.