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 Observationfrom 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.
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')
andresult = 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.