fermiPy / fermipy

Fermi-LAT Python Analysis Framework
http://fermipy.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
51 stars 53 forks source link

I am trying to analyze some data with fermipy and I am stuck! #560

Closed NithyaSathyan closed 6 months ago

NithyaSathyan commented 9 months ago

Data Analysis Question

I have installed fermipy using miniconda for python 3.9 version. Running the script for the FERMI LAT analysis with fermipy, I encounter the following issue : 2023-12-30 21:51:14 INFO GTAnalysis.init():

fermipy version 1.2.0 ScienceTools version 2.2.0 2023-12-30 21:51:15 INFO GTAnalysis.setup(): Running setup. 2023-12-30 21:51:15 INFO GTBinnedAnalysis.setup(): Running setup for component 00 2023-12-30 21:51:15 INFO GTBinnedAnalysis.run_gtapp(): Running gtselect. 2023-12-30 21:51:15 INFO GTBinnedAnalysis.run_gtapp(): time -p gtselect infile=/home/dell/data backup ubuntu dell mint/Documents/low_z_BLLACs/1H1914-194/evfile_00.txt outfile=/home/dell/data backup ubuntu dell mint/Documents/low_z_BLLACs/1H1914-194/ft1_00.fits ra=289.4383850097656 dec=-19.36280059814453 rad=7.5710678118654755 tmin=239557417.0 tmax=686188805.0 emin=1000.0 emax=300000.0 zmin=0.0 zmax=90.0 evclass=128 evtype=3 convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=3 clobber=yes debug=no gui=no mode="ql" 2023-12-30 21:51:15 INFO GTBinnedAnalysis.run_gtapp(): Parameter "infile" duplicated on command line. 2023-12-30 21:51:15 INFO GTBinnedAnalysis.run_gtapp(): Parameter "infile" duplicated on command line. 2023-12-30 21:51:15 INFO GTBinnedAnalysis.run_gtapp(): Caught N5hoops12ApeExceptionE at the top level: Cannot open parameter file for gtselect; Ape exception code 19 (at /home/conda/feedstock_root/build_artifacts/fermitools_1655479216784/work/src/hoops/src/hoops_ape.cxx: 435) 2023-12-30 21:51:15 INFO GTBinnedAnalysis.run_gtapp(): Finished gtselect. Execution time: 0.11 s 2023-12-30 21:51:15 INFO GTBinnedAnalysis.run_gtapp(): Running gtltcube. 2023-12-30 21:51:15 INFO GTBinnedAnalysis.run_gtapp(): time -p gtltcube evfile="/home/dell/data backup ubuntu dell mint/Documents/low_z_BLLACs/1H1914-194/ft1_00.fits" evtable="EVENTS" scfile=L2312300759163550A79855_SC00.fits sctable="SC_DATA" outfile=/home/dell/data backup ubuntu dell mint/Documents/low_z_BLLACs/1H1914-194/ltcube_00.fits dcostheta=0.025 binsz=1.0 phibins=0 tmin=0.0 tmax=0.0 file_version="1" zmin=0.0 zmax=90.0 chatter=2 clobber=yes debug=no gui=no mode="ql" 2023-12-30 21:51:15 INFO GTBinnedAnalysis.run_gtapp(): Parameter "evfile" duplicated on command line. 2023-12-30 21:51:15 INFO GTBinnedAnalysis.run_gtapp(): Parameter "evfile" duplicated on command line. 2023-12-30 21:51:15 INFO GTBinnedAnalysis.run_gtapp(): Caught N5hoops12ApeExceptionE at the top level: Cannot open parameter file for gtltcube; Ape exception code 19 (at /home/conda/feedstock_root/build_artifacts/fermitools_1655479216784/work/src/hoops/src/hoops_ape.cxx: 435) 2023-12-30 21:51:15 INFO GTBinnedAnalysis.run_gtapp(): Finished gtltcube. Execution time: 0.13 s Traceback (most recent call last): File "/home/dell/data backup ubuntu dell mint/Documents/low_z_BLLACs/1H1914-194/xx.py", line 4, in gta.setup() File "/home/dell/miniconda3/envs/fermipy/lib/python3.9/site-packages/fermipy/gtanalysis.py", line 1087, in setup c.setup(overwrite=overwrite) File "/home/dell/miniconda3/envs/fermipy/lib/python3.9/site-packages/fermipy/gtanalysis.py", line 5176, in setup self._ltc = LTCube.create(self.files['ltcube']) File "/home/dell/miniconda3/envs/fermipy/lib/python3.9/site-packages/fermipy/ltcube.py", line 192, in create ltc = cls.create_from_fits(files[0]) IndexError: list index out of range

The script that i used for the analysis is as follows : from fermipy.gtanalysis import GTAnalysis from astropy.coordinates.angles import angular_separation gta = GTAnalysis('config.yaml',logging={'verbosity': 3}) gta.setup() gta.free_sources(distance=3.0,pars='norm') gta.free_source('galdiff') gta.free_source('isodiff') gta.free_sources(minmax_ts=[10,None],pars='norm') gta.free_source('4FGL J1917.7-1921') gta.fit() gta.write_roi('fit_model') import numpy as np sed=gta.sed('4FGL J1917.7-1921', make_plots=True)

Plz help me to fix this. Thanks in advance.

omodei commented 6 months ago

You have path containing spaces "data backup ubuntu dell" you should not do that.

omodei commented 2 months ago

Is this solved? Can I close this issue?

NithyaSathyan commented 2 months ago

Yes.. Solved

On Tue, 23 Jul, 2024, 9:45 pm Nicola Omodei, @.***> wrote:

Is this solved? Can I close this issue?

— Reply to this email directly, view it on GitHub https://github.com/fermiPy/fermipy/issues/560#issuecomment-2245668416, or unsubscribe https://github.com/notifications/unsubscribe-auth/BE6FP4JJGZD3W7JP2F3QOATZNZ6QLAVCNFSM6AAAAABBHTWYJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBVGY3DQNBRGY . You are receiving this because you authored the thread.Message ID: @.***>