Ska.CIAO

Utilities useful within the CIAO environment

Utilities useful within the CIAO environment

Ska.CIAO.colden(ra, dec, env=None)

Determine Galactic column density at specified ra and dec. This function calls the CIAO prop_colden_exe tool.

Parameters:
  • ra – right ascension (J2000)
  • dec – declination
  • env – CIAO environment vars
Returns:

column density (10^22 cm^-2)

Ska.CIAO.dmcoords(evtfile, asolfile, pos, coordsys, celfmt='deg', env=None)

Run dmcoords for coordinates pos which are in coordinate system coord and return results as a dict.

The pos parameter must be a list with values interpreted according to the coordsys parameter:

coordsys pos list values
cel ra, dec
sky x, y
det detx, dety
logical chip_id, chipx, chipy
msc theta, phi
Parameters:
  • evtfile – x-ray event file
  • asolfile – aspect solution file or list
  • pos – list of coordinates
  • coordsys – input coordinate system (cel|sky|det|logical|msc)
  • celfmt – format for in/out RA and dec (deg|hms)
  • env – CIAO environment dict (optional)
Returns:

dict corresponding to dmcoords parameter list and values

Ska.CIAO.localize_param_files(env, dirname=None)

Make a temporary directory and put it at the head of env[‘PFILES’] so CIAO parameters for this session are localized there.

Usage:

>>> ciaoenv = Shell.getenv('. /soft/ciao/bin/ciao.bash')
>>> pfiles_dir = Util.CIAO.localize_param_files(ciaoenv)
Parameters:
  • env – (delta) environment mapping. Must have PFILES.
  • dirname – location of temporary directory (default=system tmp dir)
Returns:

TempDir object. The temp dir is deleted when TempDir object gets destroyed or goes out of scope.

Previous topic

Ska.astro

Next topic

Ska.DBI