Comments (6)
HI Tessa,
sorry the previous reply was addresed to Kyle who was the original recipient.
IonWeb should really not be available to you. It was a more or less
successful development to make the functionality of ChiantiPy available
through a web interface. Our main probablem was that our web server is a
shared server and was not sufficiently responsive so we took it down and
stopped work on it.
best regards,
Ken
On Tuesday, July 19, 2016 02:18:39 PM Tessa D. Wilkinson wrote:
In chianti.core.Ion.py, the gofnt() contribution function currently shows a
plot of relative emissivity vs temperature, prompts the user to select a
top line, and then plots the specific contribution Gofnt for that ion vs
temperature. In the middle of this process, self.Gofnt is defined.Could the plotting of this function be optional? Then, the attribute
self.Gofnt (defined with the temperature, electron density, contribution
function, index, and wavelength still) could be obtained by giving the same
information at the function call. Implementing this would be beneficial for
finding the contribution of multiple ions at a time.Also, the class ionWeb in this file has the function gofntSelectLines. I am
interested in having the self.toplines available as in this function, but
was unable to access the class.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#28
Ken Dere
from chiantipy.
The answer did not get here so here it is below
There is a fairly straightforward way to do this but the documentation
is incomplete and does not cover this.
so you have your 'fe14' object.
fe14.intensity()
this will calculate a dictionary fe14.Intensity with the following keys:
fe14.Intensity.keys()
['em',
'intensity',
'wvl',
'lvl2',
'lvl1',
'pretty2',
'ionS',
'avalue',
'pretty1',
'integrated',
'obs']
and
fe14.Intensity['wvl'][:5] give you the first 5 wavelengths in the
dictionary
array([ 5304.4868, 444.2202, 484.8212, 429.5743, 467.4282])
what you want next is the index for the line at 264.789
idx = argmin(abs(fe14.Intensity['wvl'] - 264.789))
argmin is a numpy function
print('%i'%(idx.size))
prints out 1, so there is only one line selected.
print('%10.4f'%(fe14.Intensity['wvl'][idx]))
prints out 264.7889
the G(T) function is just
mygofnt = fe14.Intensity['intensity'][:,idx]/fe14.EDensity
fe14.EDensity is just the electron density that fe14 was created with
print('%12.2e'%(fe14.EDensity))
and you get
1.00e+09
If the spectral line you are interested is a blend, then things are a
bit more difficult. I will try to write up something on that later.
best regards,
Ken
from chiantipy.
Thank you for the prompt reply. I had seen that intensity could be used alternately for plotting, but had not looked at its keys to get all of this information. This should work for running through multiple lines! My only question: does the 'em' stand for emissivity of the line, meaning that Intensity finds the emissivity of the line as well?
from chiantipy.
sorry about the confusion. We are working on the documentation. I think the API docs for the intensity() method explains this but 'em' here stands for the emission measure. If it is not specified, it is assumed to have a value of '1', 'unity'.
If you really want a list of the top lines and are will to do a small amount of programming, just enter the following line in the _ionTrails.py intensityList() module, somewhere after the list 'topLlines' is determined:
self.TopLines = topLines
then, if you have the ion 'fe14', fe14.TopLines is a list of the top lines.
It is clear the a topLines() function would be very useful as it would save a lot of code duplication. Maybe, next release
hope this is helpful
from chiantipy.
This was addressed by @tdwilkinson in #35 and can probably be closed for now.
from chiantipy.
OK, closing issue
from chiantipy.
Related Issues (20)
- ch_ss like synthetic spectra with chiantipy HOT 5
- AttributeError: module 'ChiantiPy.tools.data' has no attribute 'Abundance' HOT 27
- conda-forge package HOT 4
- KeyError on windows 10 HOT 5
- Error on running provided jupyter notebooks in the repo HOT 3
- line identifications in spectrum plot HOT 13
- Ability to give custom abundance files HOT 8
- Error while using spectrum with elementList only when all the ions are not present in the masterlist HOT 7
- Unexpected behavior when setting minAbund lower than lowest abund HOT 3
- Error when giving "Zn" in elementlist HOT 2
- How much memory does the mspectrum process consumes? HOT 1
- Chianti is taking more threads than specified HOT 2
- Clarify emission measure units in the function documentations. HOT 2
- Question: Support for photons/keV completed? HOT 10
- Getting spectrum from Ch.spectrum without smoothing/filtering HOT 4
- IDL and ChiantiPy gives different results. HOT 4
- Possible typo in function's documentation HOT 1
- NaNs generated when calculating spectra under certain conditions HOT 9
- Upload 0.15.1 to PyPI HOT 3
- Non-ionization equilibrium? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chiantipy.