plasmetheus module

Created on Mon Sep 4 12:13:10 2023

@author: Lucian Spitzner

class plasSim(setupFileName)

Bases: object

Class of the Plasmetheus simulation

__init__(setupFileName)

Read the setup file.

Parameters

setupFilestr

name of setupFile in /data/setupFiles.

buildGrid()

builds the wavelength grid set by minWavelength and maxWavelength, as well as resLow, resHigh and highResWidth. High-res regions are centered on the original line position, and embedded in the uniform low-res-region.

Uses

minWavelengthfloat

Lower bound of the grid

maxWavelengthfloat

Upper bound of the grid

resHighfloat

Resolution of the grid within high-res regions

highResWidthfloat

Width of the high-resolution region around each transition line centre

resLowfloat

Resolution of the low-resolution region

Saves both the wavelength (wvl) and frequency (freq) grid.

createFilteredFile(hID=0)

Create a filtered particle file for faster file reading. It includes three-dimensional position and velocity component in radial direction for non-proton species. Removes hydrogen particles, as well as particles obstructed by the planet.

Parameters

hIDint, optional

ID of the SID of hydrogen in the AMITIS files. The default is 0.

readFieldFile(saveTotDens=False)

reads the AMITIS field file, adding the simulation box parameters to the dictionary self.fldParams

Also reads the particle densities from the field file, turning them into the required column densities. At this moment, only assumes single ionised species.

Parameters

saveTotDensbool

if true, saves the summed densities of all non-hydrogen species (used in phase-plotting)

readLineList(species)

Read transitions of all specified species within wavelength range

Parameters

specieslist

List of all species.

readPartFile()

reads the filtered particle file, and will create a new one from the unfiltered one if it doesnt exist.

Parameters

folderNamestr

folder name containing desired AMITIS output in /data. Must contain a field and (at least one) particle file.

setup()

Set the Plasmetheus simulation up, reading the setupFile, the field- and the particle file.

simulate()

Start the simulation.