-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.py.example
68 lines (53 loc) · 3.4 KB
/
config.py.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
"""
Configuration file for the inversion using MPySIR
Example of use:
mpirun --use-hwthread-cpus -n 32 python setup.py
"""
# ================================================= INPUT
# We define the input parameters
inpufile = 'observations.fits' # Input image (can be a FITS file or a numpy NPY file).
original_axis = 'ns nw ny nx' # Axes of the input image (ns: stokes, nw: wavelength, ny: y-direction, nx: x-direction)
wavefile = '../../../data/jmb_wav.npy' # Wavelength axis in Angstroms (absolute scale) (can be a FITS file or a numpy NPY file)
mu_obs = 1.0 # Cosine of the heliocentric angle
weightStokes = '1,1,1,1' # Weights for Stokes I, Q, U, V
outputfile = 'finalSIR_cycle1.npy' # Output file with the inverted model
Linesfile = 'Lines_LTE' # Path of the file with the spectral lines parameters if not already inside invDefault
Abundancefile = 'ASPLUND' # Path of the file with the abundances if not already inside invDefault
sirfile = 'sir.x' # Path of the SIR executable if not already inside invDefault
dictLines = {'atom':'5,6'} # Line Number in Linesfile file
wavrange = None # Range of wavelength points to be used in the inversion. Default: None, Option: range(0,401)
sirmode = 'perPixel' # If 'perPixel', it uses the HSRA model. If 'continue', it starts from a previous model
inputmodel = 'finalSIR_cycle1_model.npy' # Only used if sirmode='continue'
apply_constraints = False # Apply smooth extrapolation outside [-3.5,0] before inversion (experimental)
chi2map = True # By default, we include the chi2 map in the output model
verbose = False # Verbose mode (mainly node communications)
test1pixel = True # Test the inversion of one pixel, and plot the results (for debugging)
# ================================================= INPUT - SYNTHESIS
"""inputmodel = 'simulation.npy' # dims=[ny, nx, nlogtau, npar]
wavefile = 'wav.npy' # Wavelength in Angstroms (absolute) (can be a FITS file or a numpy file)
mu_obs = 1.0 # Cosine of the heliocentric angle
Linesfile = 'Lines_LTE' # Path of the file with the spectral lines parameters
Abundancefile = 'ASPLUND' # Path of the file with the abundances
dictLines = {'atom':'5,6'} # Line Number in Linesfile file
sirfile = 'sir.x' # Path of the SIR executable
sirmode = 'synthesis'
outputfile = 'synth_newgrid.npy'
test1pixel = False # Test the calculation in one pixel
interpolate_factor = 2.0 # New logtau grid is interpolated before the synthesis
"""
# ================================================= INVERSION PARAMETERS
# We define the inversion parameters
fov = None # Using '20,20' we extract a 20x20 pixels for the inversion (None otherwise)
fov_start = '0,0' # Initial pixel for the extraction
skip = 1 # We can skip pixels in the 2D grid to reduce the pixels to invert
# We define the nodes for the inversion
# Note: the number of cycles is taken as the maximum number of node-configurations
Nodes_temperature = '5,7,9' # Temperature
Nodes_magneticfield = '5,5' # Magnetic field strength
Nodes_LOSvelocity = '5,5' # Line-of-sight velocity
Nodes_gamma = '2,3' # Magnetic field inclination
Nodes_phi = '2,3' # Magnetic field azimuth
Nodes_microturbulence = '1' # Microturbulence
Initial_micro = 1.0e5 # cm/s # Initial microturbulence
Invert_macroturbulence = '0' # Macroturbulence (if 1 -> vmacro cannot be 0 km/s)
Initial_vmacro = 0.0 # km/s of sigma or None if do not overwrite model value