ChiantiPy.Gui package¶
Submodules¶
ChiantiPy.model.Maker module¶
classes and methods to analyze observations of astrophysical spectra
-
ChiantiPy.model.Maker.
doDemGofntQ
(inQueue, outQueue)¶ helper for multiprocessing with maker.mgofnt()
-
ChiantiPy.model.Maker.
makeMatchPkl
(specData, temp, dens, wghtFactor=0.25, abundanceName=None, minAbund=1e-06, useMgofnt=1, verbose=0)¶ input a data dictionary and instantiate a dem class, and run mgofnt and then make a pickle file to use multiprocessing, this needs to be run in an ipython console
Parameters
- specDatadict
the observed line intensities, wavelegths …
-
class
ChiantiPy.model.Maker.
maker
(specData, wghtFactor=0.0, ionList=False, allLines=True, abundanceName=None, minAbund=1e-06, verbose=False)¶ Bases:
ChiantiPy.base._IonTrails.ionTrails
a class matching observed lines to lines in the CHIANTI database
-
argCheck
(temperature=None, eDensity=None, pDensity='default', verbose=0)¶ to check the compatibility of the three arguments and put them into numpy arrays of atleast_1d
-
diffPrintChi
(dir='.', filename='diffPrintChi.txt')¶ calculates the weighted and straight differences between observed and predicted prints the values saves the as a dictionary self.Diff to be used together with a prior brute-force chi-squared minimization approach
-
diffPrintMc
(dir='.', filename='diffPrintMc.txt')¶ calculates the weighted and straight differences between observed and predicted prints the values saves to a file from a PyMC run
-
emFitPlot
()¶ to plot the emission measures derived from search over temperature
-
emNtSetIndices
(indices, verbose=0)¶ to set the indices of the N temperature EM distribution
-
emPlot
(vs='T')¶ to plot line intensities divided by gofnt
-
emSet
(value)¶ sets the EM values for a N temperature EM distribution
-
emSetIndices
(indices, verbose=0)¶ to set the indices of the N temperature/density EM distribution
-
findMinMaxIndices
(verbose=0)¶ to find the minimum and maximum indices where all match[‘intensitySum’] are greater than 0
-
fit1t
(initialValue, maxfev=0)¶ calls leastsq to fit the 1t (single temperature) model
-
fitFunc1t
(em)¶ the fitting function for the isothermal model to be called by leastsq
- Parameters
em (number) – the log10 value of the emission measure
- Returns
weighted chisquared
- Return type
-
fitFuncNt
(value)¶ the fitting function for the 1 (single temperature) temperature model to be called by leastsq
-
fitNt
(initialValue, maxfev=0)¶ calls leastsq to fit the 2d model
-
getChisq
()¶ return chisq
-
getNormalizedChisq
()¶ return normalized chisq
-
getWeightedDiff
()¶ to calculated the weighted difference of each of the intensities returns a 1D array
-
gofnt
(temperature, density, verbose=1)¶ calculate the gofnt function for each of the matched lines do each ion only once
-
mgofnt
(temperature, density, proc=6, timeout=0.1, verbose=0)¶ calculate the gofnt function for each of the matched lines this is the multiprocessing version do each ion only once
-
predict
()¶ to predict the intensities of the observed lines from an emission measure the emission measure is already specified as self.Em which is an np array
-
predictPrint
(minContribution=0.1, outfile=0, verbose=0)¶ to predict the intensities of the observed lines from an emission measure the emission measure is already specified as self.Em which is an np array
-
predictPrint1d
(minContribution=0.1, outfile=0, verbose=0)¶ to predict the intensities of the observed lines from an emission measure the emission measure is already specified as self.Em which is an np array
-
search1dSpace
(initialEm, indxlimits=None, verbose=0, log=0, maxfev=0)¶ to conduct a brute force search over electron density for an isothermal-space and find the best fit to the em and density indxlimits give the range of indices to fit over can use self.MinIndex and self.MaxIndex+1 initialEm = log value of the emission measure to begin the searching
-
search1tEmSpace
(verbose=0)¶ to find the value of chisq as a function of Em with T = best-fit
-
Module contents¶
classes and methods for modeling observed spectra.