Running the Code ================ The ``run_stardis()`` Function ------------------------------ In the `Quickstart `__, there is a basic notebook that runs STARDIS and plots a spectrum. The main function, ``run_stardis()``, requires as its first argument the name of a configuration file, which will be described below. The second argument is an array of the frequencies or wavelengths for which you are requesting the flux density, times an appropriate astropy quantity (such as Hertz or Angstroms). Note that this must be an array times a quantity, **not** an array of astropy quantities. The STARDIS Configuration ------------------------- STARDIS uses `YAML `__ files for the configuration. The `Quickstart notebook `__ uses an example configuration called ``stardis_example.yml``, which can be found `here `__, along with any other files from the Quickstart. Below, we present an example for instructions for customizing the configuration for your needs. .. code:: yaml stardis_config_version: 1.0 atom_data: model: type: marcs # more options will be available in the future fname: final_atomic_number: # may be up to 30 opacity: file: # reads a bound-free or free-free opacity file, omit if none _: _: ... bf: # uses the hydrogenic approximation for bound-free opacity, omit if none : {} # there will eventually be options to include files with gaunt factors or departure coefficients : {} ... ff: # uses the hydrogenic approximation for free-free opacity, omit if none : {} # there will eventually be options to include files with gaunt factors or departure coefficients : {} ... rayleigh: # may include H, He, and/or H2, omit or use [] for none disable_electron_scattering: line: # settings for line interaction opacity, at least one subfield is required disable: broadening: # may include radiation, linear_stark, quadratic_stark, and/or van_der_waals, omit or use [] for none min: # must have units, such as Hz or AA max: # must have units, such as Hz or AA broadening_range: # necessary for computational efficiency and must have units, 1e13 Hz recommended no_of_thetas: In fields where an atomic species is requested, the species must be in the form ``_``. For example, ``H_I`` for neutral hydrogen, or ``Si_III`` for twice-ionized silicon. Additionally, in the opacity file section, the following entries are valid: * ``Hminus_bf`` * ``Hminus_ff`` * ``Heminus_ff`` * ``H2minus_ff`` * ``H2plus_ff`` Opacity File Format ------------------- STARDIS can read and interpolate continuum opacity cross-section files for bound-free or free-free absorption (technically, for free-free absorption the files would provide the cross-section per electron density). The files must be one of the following formats: .. code:: csv wavelength_1, cross-section_1 wavelength_2, cross-section_2 wavelength_3, cross-section_3 ... or .. code:: csv , temperature_1, temperature_2, temperature_3, ... wavelength_1, cross-section_11, cross-section_12, cross-section_13, ... wavelength_2, cross-section_21, cross-section_22, cross-section_23, ... wavelength_3, cross-section_31, cross-section_32, cross-section_33, ... ... Note the leading comma in the latter format. Temperatures must be in Kelvin, wavelengths in Angstroms, and cross-sections in cm\ :sup:`2`\ for bound-free or cm\ :sup:`5`\ for free-free (once again because free-free opacity files provide the cross-section per electron density).