Table model for spectropolarimetry example

Writing a table for a spectropolarimetric table requires providing three spectra for each point in the table. The initial set-up of the table descriptors now becomes:

test.setModelName("SPTest")
test.setModelUnits(" ")
test.setisRedshift(True)
test.setisAdditive(True)
test.setisError(False)
filters = ["Stokes:0","Stokes:1","Stokes:2"]
test.setFiltExps(filters)

and the loops setting the example spectra:

for i1 in range(11):
  for i2 in range(5):
    flux = empty((99))
    for k in range(3):
      for j in range(99): flux[j] = 0.2*i1+10*(4.6+0.2*i2)+j*0.1+k/3.0
      testspec = tableSpectrum()
      testspec.setParameterValues(np.array([0.2*i1,4.6+0.2*i2]))
      testspec.setFlux(flux)
      test.pushSpectrum(testspec)




HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public

Last modified: Wednesday, 28-Feb-2024 16:27:30 EST