Giter VIP home page Giter VIP logo

aphot's People

Contributors

kmsurrao avatar ndaniyar avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

aphot's Issues

problems while running Aphot

Dear all,

while running Aphot in /examples/SPT-CLJ0352-5647 with the command line

python ../../aphot.py --evt_files=13490.evt.fits --exp_files=13490.exp.fits --reg_files=13490.psf.reg --ra=28.172 --dec=-13.970 --z=0.833 --R500=811.7

I got the following errors that I'm not able to solve:
Traceback (most recent call last):
File "../../aphot.py", line 49, in
p.inspect)
File "/Users/rcassano/Work/PROGRAMS/aphot-master/chandra.py", line 333, in process_multiple_obs
evt, expm = get_events_expmap(evt, exph, expm, regions, ths, R_bkgr_px, inspect)
File "/Users/rcassano/Work/PROGRAMS/aphot-master/chandra.py", line 187, in get_events_expmap
mask_regions(ptsrc_mask, regions, offset)
File "/Users/rcassano/Work/PROGRAMS/aphot-master/chandra.py", line 97, in mask_regions
mask[yl:yr, xl:xr] &= ~ellipsemask(xc, yc, a, b, th)(y_ind[yl:yr,xl:xr], x_ind[yl:yr,xl:xr])
TypeError: slice indices must be integers or None or have an index method

Is anybody able to solve this problem?

The only change I made to the code is to substitute in the module chandra.py the command line
import pyfits
with
from astropy.io import fits as pyfits

because I got errors with pyfits

Issues with aphot

Dear all

When I am running this code using the following command line:

python ~/.../.../morphology_classification/aphot.py --evt_files=13490.evt.fits --ra=28.172 --dec=-13.970 --z=0.833 --R500=811.7 --Nresamplings=0

I got the following error message:

Traceback (most recent call last):
File "/.../.../morphology_classification/aphot.py", line 48, in
p.path, p.evt_files.split(), p.exp_files.split(),p.reg_files.split()),p.inspect)
File "/.../.../morphology_classification/chandra.py", line 369, in process_multiple_obs
evt, expm = get_events_expmap(evt, exph, expm, regions, ths, R_bkgr_px, inspect1)
File "/.../.../morphology_classification/chandra.py", line 174, in get_events_expmap
offset = -radec2xy_winding(*xy2radec(0, 0, evt.header), h=exph) * bins
File "/.../.../morphology_classification/chandra.py", line 36, in radec2xy_winding
x, y = radec2xy(ra, dec, h)
File "/.../.../morphology_classification/chandra.py", line 28, in radec2xy
res = XY((ra-h['CRVAL1'])/h['CDELT1']cos(h['CRVAL2']/180pi) + h['CRPIX1'] - 0.5,
KeyError: 'CRVAL1'

and when I try to run the code with the following command line (adding exposure file):

python ~/.../.../morphology_classification/aphot.py --evt_files=13490.evt.fits --exp_files=13490.exp.fits --ra=28.172 --dec=-13.970 --z=0.833 --R500=811.7

I got the following message:

/.../.../morphology_classification/chandra.py:94: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
mask[yl:yr, xl:xr] &= ~ellipsemask(xc, yc, a, b, th)(y_ind[yl:yr,xl:xr], x_ind[yl:yr,xl:xr])
/.../.../morphology_classification/chandra.py:262: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
expm = expm[yl:yr, xl:xr]
/.../.../morphology_classification/chandra.py:263: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
tmp = ptsrc_mask[ylbins:yrbins, xlbins:xrbins].astype(int)
/.../.../morphology_classification/chandra.py:264: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
ptsrc_exp = sum(sum(tmp.reshape(yr-yl, bins, xr-xl, bins), 3), 1)
Traceback (most recent call last):
File "/.../.../morphology_classification/aphot.py", line 46, in
evt, expm = process_multiple_obs(p.ra, p.dec, int(1.5R500px), p.Eband, [xR500px for x in p.R_bkgr], p.path, p.evt_files.split(), p.exp_files.split(), p.reg_files.split(), p.inspect)
File "/.../.../morphology_classification/chandra.py", line 331, in process_multiple_obs
evt, expm = get_events_expmap(evt, exph, expm, regions, ths, R_bkgr_px, inspect)
File "/.../.../morphology_classification/chandra.py", line 264, in get_events_expmap
ptsrc_exp = sum(sum(tmp.reshape(yr-yl, bins, xr-xl, bins), 3), 1)

Is anyone able to help to fix these issues?

Best wishes

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.