keflavich / FITS_tools

Simple scipy and python based tools for FITS image manipulation
17 stars 12 forks source link

Importing hcongrid #9

Open tjgalvin opened 6 years ago

tjgalvin commented 6 years ago

I have installed fits_tools using pip, and am running the miniconda python distribution.

I was attempting to use thefits_tools.match_fits() function to project one FIT image onto another pixel grid. I found that when running the package as is, I was getting an error from project_to_header in match_images.py, saying that the return image was uing image before it existed.

A bit of inspecting, I found that that was being triggered because montageOK and hcongridOK both were being assigned to be False. I gave up installing montage, but found that the hcongrid.py was not being imported even though it was in the fits_tools site-package folder.

I fixed this by replacing

import hcongrid

with import .hcongrid

in the match_images.py file.

I am not sure if this is an issue specific to me and my system configuration, or whether it could be useful to other

keflavich commented 6 years ago

Thanks for the report. This is probably a bug, and one I might be able to fix, but the code you're trying to use should now be superceded by https://reproject.readthedocs.io, so check out that package and see if it suits your needs better.

tjgalvin commented 6 years ago

Great - thanks for the prompt reply and new module to follow up with