Scripts


To call the scripting window, click on the menu Scripts or click on the icon . In both cases, a pop-up window opens:

You can write your own jython script or use one of the scripts we provide as an example in the directory $CASSIS_DIR/delivery/script/examples, where $CASSIS_DIR is your installation directory. Some of these scripts make use of the data distributed in $CASSIS_DIR/delivery/data.

A short description of each script is given below, see within each script for more details.

Script Purpose
CH3OH_MCMC_LTE.py Show how to use the LineAnalysisScripting module with :
  • one molecule (CH3OH)
  • chi2 computation with the Monte-Carlo Markov Chain algorithm
  • two components with the LTE model
NB: calls Plots_MCMC.py, which requires Python to be installed.
CO_RG.py Show how to use the LineAnalysisScripting module with 2 molecules in regular grid with the LTE model.
CO_RG_LTE.py Show how to use the LineAnalysisScripting module with :
  • two molecule (12CO & 13CO)
  • chi2 computation with a regular grid
  • two components with the LTE model
Database.py Demonstrate the use of the CASSIS database API.
ghosstRead.py Read a GHOSST xml Spectrum file and display it in CASSIS ; this type of file can be downloaded from http://ghosst.osug.fr/
H2CO_MCMC_Radex.py Show how to use the LineAnalysisScripting module with :
  • two molecule (o-H2CO & p-H2CO)
  • chi2 computation with the Monte-Carlo Markov Chain algorithm
  • two components with the RADEX model
NB: calls Plots_MCMC.py, which requires Python to be installed.
H2CO_RG_LTE.py Show how to use the LineAnalysisScripting module with :
  • one molecule (H2CO)
  • chi2 computation with a regular grid
  • two components with the LTE model
H2CO_RG_Radex.py Show how to use the LineAnalysisScripting module with :
  • one molecule (H2CO)
  • chi2 computation with a regular grid
  • two components with the RADEX model (p-H2 and o-H2 are the collision partners)
inspectsFitsFile.py Print FITS headers information that we get using the jfits-cassis library for each HDU. For each keyword, print the name, the value and the description/comment.
Inverse_PCygni.py TBC
Plots_MCMC.py Python (not Jython) script called by the MCMC scripts to display the results in a so-called "triangle" plot.
rotationalpoint.py Print values of the points from Rotational Diagram.
saveSpectrumToFits.py Save a spectrum in a fits file from Jython scripting interface in CASSIS.
testPartitionFunction.py Compute the partition fonction of a molecule by using the database.

Note that general information about scripting in CASSIS can be found here.