Comments (11)
from chiantipy.
Python distribution is Anaconda Python 2.7.12.
import os
os.environ["XUVTOP"]="C:\\Users\\shiggins\\Documents\\CHIANTI"
os.environ["HOME"]="C:\\Users\\shiggins\\Documents\\CHIANTI"
import ChiantiPy.core as ch
import numpy as np
t = 10.**(5.8 + 0.05*np.arange(21.))
fe14 = ch.ion('fe_14', temperature=t, eDensity=1.e+9, em=1.e+27)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\shiggins\AppData\Local\Continuum\Anaconda2\lib\site-packages\chiantipy-0.7.dev506-py2.7.egg\ChiantiPy\core\Ion.py", line 114, in __init__
self.Defaults = chdata.Defaults
AttributeError: 'module' object has no attribute 'Defaults'
This error occurs with chianti.ioneq present in PaxHeaders.23462 folder. If I remove the file (I just threw it on the Desktop), no errors - all works fine.
from chiantipy.
try:
import ChiantiPy.tools.data as chdata
for akey in chdata.Defaults.keys(): print(akey)
this should give a list of things like:
abundfile
wavelength
flux
ioneqfile
gui
let us know what happens
from chiantipy.
Import succeeds, command returns:
ioneqfile
wavelength
gui
abundfile
flux
That's all, though.
from chiantipy.
It looks like you are able to import the attribute that has the names of various default values
for example
chdata.Defaults['ioneqfile'] should give the the name 'chianti' and this corresponds to the ioneq file chianti.ioneq
you are using ChiantiPy version 0.7.0... which should be OK.
I also do not understand
PaxHeader.23462
has
that got something to do with the Anaconda package?
I am at a bit of a loss here
from chiantipy.
No, it's part of the gzipped Chianti database that you have to download prior to installing ChiantiPy.
From the instructions at http://chiantipy.sourceforge.net/installing.html:
The gzipped data tar ball can be downloaded from the CHIANTI website
- put the file in a convenient directory, cd to the directory and untar the file
- ChiantiPy uses the environment variable XUVTOP to find the database. Set XUVTOP to the name of the directory where the CHIANTI data tarball was placed.
So when you unzip those files, you get a series of folders - mostly element names, and then some metadata. There is a folder ioneq, which contains a file chianti.ioneq. There is also a folder ioneq/PaxHeaders.23462, which also contains a file chianti.ioneq. If I don't remove the second copy, ChiantiPy complains about it on import of ChiantiPy.core ("found more than one ioneq file.") I then get the errors that I reported. If I remove the file from that folder, everything behaves fine. I just wanted to let you know about that.
from chiantipy.
from chiantipy.
No problem, thanks for the response. Good to know about the SourceForge docs.
from chiantipy.
I just downloaded the database from chiantidatabase.org and it did not have the "PaxHeader" things in it. You might want to do a clean install it your have more problems like that.
from chiantipy.
@sahiggin what utility are you using to extract/unzip the CHIANTI tarball?
from chiantipy.
I've downloaded the latest tarball from the CHIANTI webpage and using the command,
$ tar xvzf /path/to/tarball.gz
on Mac OS X v10.11.6 (El Capitan) I do not get any of these PaxHeader files. A bit of googling seems to suggest this is an OS or zip-tool dependent issue:
- PaxHeader folder in prebuilt packages
- #1413 tar file contents reported incorrectly (extra PaxHeaders.### folders)
- includes ././@PaxHeader which confuses older tar versions
I would try a few different zip tools, perhaps playing around with the different command-line options each offers. As you say, one option is obviously just to remove these files manually.
Either way, this seems to not be related to the ChiantiPy code itself so I'm going to go ahead and close this issue. Feel free to continue this thread if you're still having issues with these files and we can try to figure it out.
from chiantipy.
Related Issues (20)
- Clarify Continuum Units HOT 3
- FileNotFoundError: klgfb.dat' HOT 13
- 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
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.