PAHdb / pyPAHdb

A Python tool to decompose astronomical PAH emission into contributing PAH subclasses.
https://www.astrochemistry.org/pahdb/
BSD 3-Clause "New" or "Revised" License
7 stars 6 forks source link

package and class importing/calling issue #29

Closed alexmaragko closed 3 years ago

alexmaragko commented 4 years ago

Following the README.md example, after importing pypahdb, calling pypahdb.Observation or pypahdb.Decomposer raises an AttributeError: module 'pypahdb' has no attribute 'Observation'(or 'Decomposer').

The Observation and Decomposer classes need to be imported as:

from pypahdb.observation import Observation from pypahdb.decomposer import Decomposer in order to work.

Then, observation = Observation('/path/to/observation.fits') and result = Decomposer(observation.spectrum)

will work without issues, however the “pypahdb.” part in front of Observation and Decomposer must be omitted.

Running pyPAHdb on Linux 64-bit, from an (astro)conda environment using Python 3.7.6.

PAHdb commented 3 years ago

Fixed with https://github.com/PAHdb/pyPAHdb/pull/32 and https://github.com/PAHdb/pyPAHdb/pull/35.