# Quickstart Guide¶

Performing a calculation with sasktran can be broken up into three steps:

• Defining the geometry of the problem. Typically this boils down to calculating an observer location, a look vector, and a timestamp for the measurements.

• Creating a representation of the atmospheric state for the calculation.

• Choosing a radiative transfer model and setting it up for the calculation.

## Defining the Geometry¶

The raw input to sasktran for each measurement is the observer location, a unit look vector, and a timestamp represented with a Modified Julian Date. If you already have these things, excellent, we can directly create a sasktran.Geometry object,

import sasktran as sk

geometry = sk.Geometry()

los_1 = sk.LineOfSight(observer=[3.676013154788849600e+005, 1.009976313640051500e+006, -6.871601202127538600e+006],
look_vector=[2.884568631765662100e-001, 7.925287180643269000e-001,  5.372996083468238900e-001],
mjd=54832.5)
los_2 = sk.LineOfSight(observer=[3.692808540679614500e+005, 1.014590807988641800e+006, -6.870844156040793300e+006],
look_vector=[2.884568631765662100e-001, 7.925287180643269000e-001,  5.372996083468238900e-001],
mjd=54832.5)

geometry.lines_of_sight = [los_1, los_2]


If you want to define the geometry based on solar angles, there are several convenience methods that can help:

from sasktran.geometry import VerticalImage

geometry = VerticalImage()
geometry.from_sza_saa(sza=60, saa=60, lat=0, lon=0, tanalts_km=[10, 20, 30, 40], mjd=54372, locallook=0,
satalt_km=600, refalt_km=20)


## Representing the Atmosphere¶

Each atmospheric constituent is represented by two things:

The sasktran.Atmosphere combines these things together for multiple species to make up the full atmospheric state. Many precomputed climatologies and optical properties are avaialable, or you can define your own. But for now let’s create an atmosphere consisting of Rayleigh scattering and ozone absorption with precomputed climatologies:

import sasktran as sk

atmosphere = sk.Atmosphere()

atmosphere['ozone'] = sk.Species(sk.O3OSIRISRes(), sk.Labow())
atmosphere['air'] = sk.Species(sk.Rayleigh(), sk.MSIS90())


## Setting up the Engine¶

The final step is creating the sasktran.Engine object which actually performs the radiative transfer calculation. sasktran contains multiple radiative transfer models, but for most standard applications it is recommended to use the hr engine:

import sasktran as sk

# First recreate our geometry and atmosphere classes
geometry = VerticalImage()
geometry.from_sza_saa(sza=60, saa=60, lat=0, lon=0, tanalts_km=[10, 20, 30, 40], mjd=54372, locallook=0,
satalt_km=600, refalt_km=20)

atmosphere = sk.Atmosphere()

atmosphere['ozone'] = sk.Species(sk.O3OSIRISRes(), sk.Labow())
atmosphere['air'] = sk.Species(sk.Rayleigh(), sk.MSIS90())

# And now make the engine
engine = sk.EngineHR(geometry=geometry, atmosphere=atmosphere)

# Choose some wavelengths to do the calculation at
engine.wavelengths = [340, 600]

# And do the calculation