Git Product home page Git Product logo

Comments (6)

kdere avatar kdere commented on August 20, 2024

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.

kdere avatar kdere commented on August 20, 2024

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.

tdwilkinson avatar tdwilkinson commented on August 20, 2024

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.

kdere avatar kdere commented on August 20, 2024

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.

wtbarnes avatar wtbarnes commented on August 20, 2024

This was addressed by @tdwilkinson in #35 and can probably be closed for now.

from chiantipy.

kdere avatar kdere commented on August 20, 2024

OK, closing issue

from chiantipy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.