-
-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of config parser validation and completion #80
Changes from 11 commits
3ef9b5b
c8860be
de677f8
fab69cc
36a72d1
396a678
2c2e183
281342e
5409bec
f64d02b
b1efeae
c50d0ea
6afed4c
e3f10e0
dbf86a2
bc8e50a
f312aae
cb74219
913c27f
2956493
2b2cd91
9dad90c
38af9bb
93581a8
22046bb
3148500
2d805cd
641cf9b
78b081e
ca6e410
99689df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,232 @@ | ||
|
||
tardis_config_version: | ||
property_type: string | ||
help: Version of the configuration file | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is a |
||
|
||
|
||
supernova: | ||
luminosity_requested: | ||
property_type: quantity | ||
mandatory: True | ||
default: None | ||
help: requested output luminosity for simulation | ||
|
||
time_explosion: | ||
property_type: quantity | ||
mandatory: True | ||
default: None | ||
help: time since explosion | ||
|
||
|
||
atom_data: | ||
property_type: string | ||
mandatory: True | ||
help: path or filename to the Atomic Data HDF5 file | ||
|
||
|
||
model: | ||
structure: | ||
property_type : container-property | ||
|
||
type: | ||
property_type: container-declaration | ||
containers: ['file', 'specific'] | ||
_file: ['file_property'] # why list | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is |
||
|
||
_specific: ['specific-property'] | ||
|
||
file_property: | ||
filename: | ||
property_type: string | ||
default: None | ||
mandatory: True | ||
help: file name (with path) to structure model | ||
|
||
filetype: | ||
property_type: string | ||
default: None | ||
mandatory: True | ||
help: file type | ||
#### there are only a handful of types available how do we validate that #### | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I haven't seen the constraints in there. It was in one of the earlier versions. Anyways there is like 3 filetypes allower |
||
|
||
v_inner_boundary: | ||
property_type: quantity | ||
default: 0 km/s | ||
mandatory: False | ||
help: location of the inner boundary chosen from the model | ||
|
||
v_outer_boundary: | ||
property_type: quantity | ||
default: inf km/s | ||
mandatory: False | ||
help: location of the inner boundary chosen from the model | ||
|
||
specific_property: | ||
velocity: | ||
property_type: quantity_sampled_old | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I really do like your new range sampled using the |
||
default: None | ||
mandatory: True | ||
help: > | ||
location of boundaries in the velocity field. | ||
There will be n-1 cells as this specifis both the inner and outer velocity components | ||
|
||
|
||
density: | ||
property_type: container-property | ||
type: | ||
property_type: container-declaration | ||
containers: ['branch85_w7'] | ||
|
||
_branch85_w7: ['branch85_w7-property'] # list | ||
|
||
branch85_w7-property: | ||
time_0: | ||
property_type: quantity | ||
default: 19.9999584 s | ||
mandatory: False | ||
help: This needs no change - DO NOT TOUCH | ||
|
||
density_coefficient: | ||
property_type: float | ||
default: 3e29 | ||
mandatory: False | ||
help: This needs no change - DO NOT TOUCH | ||
|
||
|
||
abundances: | ||
#what do we do about that? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. abundances are a difficult topic, Which we might have discussed. There are 92 elements and I think making an entry with default 0 for all of them is not sensible. How do we do that? Maybe we can just skip this key and leave as is when we validate a yaml file. |
||
|
||
|
||
|
||
plasma: | ||
initial_t_inner: | ||
property_type: quantity | ||
default: None | ||
mandatory: False | ||
help: > | ||
Initial temperature of the black-body at the inner boundary. | ||
If set to `None` will set the temperature to match the output temperature | ||
|
||
initial_t_rads: | ||
property_type: quantity | ||
default: 10000 K | ||
mandatory: False | ||
help: initialize the radiation temperature in each cell | ||
|
||
disable_electron_scattering: | ||
property_type: bool | ||
default: False | ||
mandatory: False | ||
help: Disables electron scattering. WARNING!! use only for testing - non-physical | ||
|
||
ionization: | ||
property_type: string | ||
default: None | ||
mandatory: True | ||
help: Treatment of ionization | ||
#what about different options for validations | ||
|
||
excitation: | ||
property_type: string | ||
default: None | ||
mandatory: True | ||
help: Treatment of excitation | ||
|
||
radiative_rates_type: | ||
property_type: string | ||
default: None | ||
mandatory: True | ||
help: Treatment the radiative rates | ||
|
||
line_interaction_type: | ||
property_type: string | ||
default: None | ||
mandatory: True | ||
help: Treatment the line interaction | ||
|
||
|
||
montecarlo: | ||
seed: | ||
property_type: int | ||
default: 23111963 | ||
mandatory: False | ||
help: Seed for the random number generator | ||
|
||
no_of_packets: | ||
property_type: int | ||
default: None | ||
mandatory: True | ||
help: Seed for the random number generator | ||
|
||
iterations: | ||
property_type: int | ||
default: None | ||
mandatory: True | ||
help: Number of maximum iterations | ||
|
||
black_body_sampling: | ||
property_type: quantity_sampled_old | ||
default: "[1, 1e6, 1e6] angstrom" | ||
mandatory: False | ||
help: > | ||
Sampling of the black-body for energy packet creation | ||
(giving maximum and minimum packet frequency) | ||
|
||
last_no_of_packets: | ||
property_type: int | ||
default: None | ||
mandatory: False | ||
help: > | ||
This can set the number of packets for the last run. | ||
If set to None it will remain the same as all other runs. | ||
|
||
no_of_virtual_packets: | ||
property_type: int | ||
default: 0 | ||
mandatory: False | ||
help: > | ||
Setting the number of virtual packets for the last iteration. | ||
|
||
|
||
converge_criteria: | ||
property_type : container-property | ||
type: | ||
property_type: container-declaration | ||
containers: ['specific'] | ||
_specific: ['specific-property'] | ||
|
||
specific-property: | ||
damping_constant: | ||
property_type: float | ||
default: None | ||
mandatory: True | ||
help: Damping constant for convergence behaviour | ||
|
||
threshold: | ||
property_type: float | ||
default: None | ||
mandatory: True | ||
help: threshold for convergence | ||
|
||
fraction: | ||
property_type: float | ||
default: None | ||
mandatory: True | ||
help: fraction of shells that need to have converged to the necessary threshold | ||
|
||
hold: | ||
property_type: float | ||
default: None | ||
mandatory: True | ||
help: > | ||
Number of iterations that the simulation needs to run abiding by the convergence criteria | ||
before it is considered converged | ||
|
||
|
||
spectrum: | ||
property_type: quantity_sampled_old | ||
default: None | ||
mandatory: True | ||
help: Final spectrum sampling | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ssim this is what a config definition taking @mklauser's new configparser would look like. We believe we can also use that to easily generate a help file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok - looks good.