Giter Club home page Giter Club logo

pypahdb's People

Contributors

alexmaragko avatar mattjshannon avatar pahdb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pypahdb's Issues

Travis and pickle

It seems Travis is not putting the downloaded pickle in the expected location. The setup.py-script should download it into pypahdb/data/precomputed.pkl. This is what makes the build-status to be reported "build failing" while everything else is OK. The newly created unit-test for the Decomposer class throws the error.

Documentation fixes for API changes

General doc updates needed:

  • Update intro/usage for changes in API (remove writer reference and replace with save_xxx, class names etc.)
  • Update academic reference(s), little subsections, Bibtex entries?

In tutorial notebooks:

  • Updated class names/imports.
  • Funny line-break (tutorial 1).
  • Reference the Spitzer spectrum (Boersma+ 2012?)
  • Update for recent changes, i.e., capitalize class names and remove writer-class.
  • Incorporate some aesthetic changes (based on astropy tutorials).

charmap decoding error

image
image

Hello,

I faced another error while running this code to get the observation for the .fits file as well as the .tbl file. I have attached the screenshot - can you kindly look into it? I'll be grateful once more. I have also attached screenshot for the modules which i entered. The data was taken from the following archive: https://sha.ipac.caltech.edu/applications/Spitzer/SHA/#id=SearchByPosition&RequestClass=ServerRequest&DoSearch=true&SearchByPosition.field.radius=0.13888889000000001&UserTargetWorldPt=11.888;-25.28822;EQ_J2000&TargetPanel.field.targetName=ngc%20253&SimpleTargetPanel.field.resolvedBy=nedthensimbad&MoreOptions.field.prodtype=pbcd&shortDesc=Position&isBookmarkAble=true&isDrillDownRoot=true&isSearchResult=true

Also, the sample files for this code are running perfectly. Specifically the sample data for ngc 7023. Both the .fits and .tbl files.

Thank You.

Astropy distortion warning when running example_fits.py

The specific warning is:
WARNING: FITSFixedWarning: Removed redundant SCAMP distortion parameters because SIP parameters are also present [astropy.wcs.wcs] WARNING:astropy:FITSFixedWarning: Removed redundant SCAMP distortion parameters because SIP parameters are also present

It runs fine, aside from the warning. Do you receive the warning as well? Looks like we could just remove an attribute from the FITS header?

The warning came with an info dump:

INFO:
Inconsistent SIP distortion information is present in the FITS header and the WCS object:
SIP coefficients were detected, but CTYPE is missing a "-SIP" suffix.
astropy.wcs is using the SIP distortion coefficients,
therefore the coordinates calculated here might be incorrect.

            If you do not want to apply the SIP distortion coefficients,
            please remove the SIP coefficients from the FITS header or the
            WCS object.  As an example, if the image is already distortion-corrected
            (e.g., drizzled) then distortion components should not apply and the SIP
            coefficients should be removed.

            While the SIP distortion coefficients are being applied here, if that was indeed the intent,
            for consistency please append "-SIP" to the CTYPE in the FITS header or the WCS object.

             [astropy.wcs.wcs]

INFO:astropy:
Inconsistent SIP distortion information is present in the FITS header and the WCS object:
SIP coefficients were detected, but CTYPE is missing a "-SIP" suffix.
astropy.wcs is using the SIP distortion coefficients,
therefore the coordinates calculated here might be incorrect.

            If you do not want to apply the SIP distortion coefficients,
            please remove the SIP coefficients from the FITS header or the
            WCS object.  As an example, if the image is already distortion-corrected
            (e.g., drizzled) then distortion components should not apply and the SIP
            coefficients should be removed.

            While the SIP distortion coefficients are being applied here, if that was indeed the intent,
            for consistency please append "-SIP" to the CTYPE in the FITS header or the WCS object.

"Format not recognized" error

When trying to read a 2 or 3 column (3rd column being flux uncertainties) IPAC spectrum file it raises a “Format not recognized” error. However, Astropy's “ascii.read” can read both tables without errors. This is strange because on line 91 of observation.py, ascii.read is called in the exact same way as when reading the spec file independently using ascii.read. Moving the spectrum file into the "resources/" directory made no difference. I'm uploading the 2 column spectrum file here (renamed from .ipac to .txt so that GitHub can recognize it).
spec_example.txt

Update package requirements

We should determine what the minimum version numbers are for the required modules (e.g., numpy, scipy). I imagine there's a reasonably simple way of doing this.

Astropy

Join/mimic Astropy behavior?

Possible performance issues?

Qualitatively, running tutorial 1 (with the API changes of decomposer.py) seems like it might have lost some performance. @PAHdb, would you be able to benchmark pyPAHdb using the same data/parameters as was done for the conference proceeding? Just to see if the numbers still line up. Thanks.

Desired outputs?

The example will currently create a PDF of the resulting fit to the sample data. We should make a list of what quantitative outputs are desireable for the user, so that they can perform quantitative analyses using our PAHdb fits.

Presumably want...

  • map of relevant quantities (if a spectral map is used): e.g., size (large vs small), charge state, composition?
  • perhaps a list of which molecules dominate the fit (and in what fractions)
  • spectra of a certain number of species?
  • maybe a histogram of size, charge, etc.

Perhaps once we have a list we could break these out into separate issues.

More convenient way to access/import sample data

There is a way to specify certain files within the repo as "data" or special files, such that when we want access them, we would not have to know their absolute paths at all times. Instead we basically import them a la Python modules if I recall correctly. I know I've seen this done before though I don't remember the code. I'll try to look up how to do this.

It will be useful because otherwise in the tutorial files I'll have to specify the relative paths of the example data I wish to use (or hard-code their absolute paths, which could change in the future). Being able to simply import the data makes the tutorials agnostic to the repo structure, which would be a nice property long-term.

Not high priority, but I think it's something we should incorporate. I believe it's rather straight-forward (once I find it online again!).

package and class importing/calling issue

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.

Git Large File Storage GitHub Bandwidth

The free-tier lfs-storage at GitHub only offers 1Gb/month bandwidth - saturating the quota with only four downloads of the precomputed matrix.

There are three solutions to this:

  1. Pay GitHub $5/month for a bandwidth of 50Gb/month
  2. Update the python code to download the precomputed matrix from the astrochemistry-domain upon first usage
  3. Setup a lfs-server at astrochemistry - one implementation that seems straightforward, allows HTTPS and authentication is by artemkin

Improve test coverage

Unit tests need some TLC, particularly the decomposer.py and decomposer_base.py modules.

Other File Formats

Add code to read ISO-SWS fits-files as provided by IPAC as well as by the original Java-applet (ida.jnlp), i.e., from write IDL's OSIA.

Changelog

We need to decide how we are going to deal with the CHANGELOG-file. Options are:

  1. Don't have one.
  2. Copy release info from docs into CHANGELOG-file.

Not Able to Install in Windows

Hi, I tried to install this code in my windows machine with all the necessary requirements but it is making the following error (attached). Please let me know if anything can be done.

Thank You.

2021-08-04 (11)

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.