davidsanchez / ctatools Goto Github PK
View Code? Open in Web Editor NEWSet of tools to analyse CTA data
License: GNU General Public License v3.0
Set of tools to analyse CTA data
License: GNU General Public License v3.0
Possibility to have chose fixed or free coordinates in the fit.
Hi cold you help me download Ctatools.
tried python install_CTAtools.py but didn't work. Got:
Cloning ebltable repo
fatal: destination path 'ebltable' already exists and is not an empty directory.
Test the setup
*** COMMAND LINE TOOLS ***
python.............. /home/administrator/miniconda/bin/python
ipython............. /home/administrator/miniconda/bin/ipython
ctlike.............. /home/administrator/miniconda/bin/ctlike
*** PYTHON PACKAGES ***
ebltable............ MISSING
pyfits.............. /home/administrator/miniconda/lib/python2.7/site-packages/pyfits/init.pyc
astropy............. /home/administrator/miniconda/lib/python2.7/site-packages/astropy/init.pyc
yaml................ /home/administrator/miniconda/lib/python2.7/site-packages/yaml/init.pyc
iminuit............. MISSING
numpy............... /home/administrator/miniconda/lib/python2.7/site-packages/numpy/init.pyc
scipy............... /home/administrator/miniconda/lib/python2.7/site-packages/scipy/init.pyc
matplotlib.......... /home/administrator/miniconda/lib/python2.7/site-packages/matplotlib/init.pyc
ebl................. MISSING
*** DIRECTORIES ***
FERMI_CATALOG_DIR... NO........
INST_DIR............ NO........
CONFIG_DIR.......... NO........
probably due to wrong list of sources
In ctlike:
Generate spectral residuals with csresspec:
http://cta.irap.omp.eu/ctools/users/reference_manual/csresspec.html?highlight=csresspec
In cases when none of the bins satisfies the conditions (excess>10, TS>2, excess/bg<0.05) the analysis is performed in the whole energy range [50 GeV - 50 TeV]. It should be performed just in the first 2 bins.
Simulated data are produced in FITS format. In the DC1 scripts, ctselect create an XML file, starting from an XML file. Rename the FITS output with an XML extension could generate problems in the next steps.
Hi @davidsanchez ,
Do you think this repository would be a good place to upload the script (and generated catalog) that I sent around? I could document the script a bit, and upload it maybe to the "Catalogs" folder.
If you think this is not a good place, then I will upload it anywhere else, no worries.
Cheers!
Tarek
set the edisp option = yes in ctobssim (script DC1/Simulation.py)
Reference manual:
http://cta.irap.omp.eu/ctools/users/reference_manual/ctobssim.html#
The minimum energy needs to be set for each source. The first energy bin should fulfill the following conditions: (i) ts>2, (ii) excess>10, (iii) excess/bg<0.05).
different if I implement it in the .py macro or if calling them Analyse.ctbutterfly--> scaled by a factor)
upper limits in the spectrum are not computed (even if we it was set to βyesβ).
the residual map (different if I implement it directly in the .py macro or if calling them Analyse.csresmap)
csphagen does not create on off file when using a single observation?
Impossible to run the analysis with a single simulated observation.
Error:
[CTA_ctools_script]: csphagen successfully ran
Traceback (most recent call last):
File "Fit_DC1_Spectra.py", line 52, in
Ondata = pyfits.open(Onfile)[1].data
File "/usr/lib/python2.7/dist-packages/pyfits/hdu/hdulist.py", line 124, in fitsopen
return HDUList.fromfile(name, mode, memmap, save_backup, **kwargs)
File "/usr/lib/python2.7/dist-packages/pyfits/hdu/hdulist.py", line 266, in fromfile
save_backup=save_backup, **kwargs)
File "/usr/lib/python2.7/dist-packages/pyfits/hdu/hdulist.py", line 786, in _readfrom
ffo = _File(fileobj, mode=mode, memmap=memmap)
File "/usr/lib/python2.7/dist-packages/pyfits/file.py", line 132, in init
self._open_filename(fileobj, mode, clobber)
File "/usr/lib/python2.7/dist-packages/pyfits/file.py", line 487, in _open_filename
self._file = fileobj_open(self.name, PYFITS_MODES[mode])
File "/usr/lib/python2.7/dist-packages/pyfits/util.py", line 754, in fileobj_open
return open(filename, mode)
IOError: [Errno 2] No such file or directory: '/home/biasuzzi/Desktop/DC1_Analysis/EBL_10h_piv300GeV/PKS0507+17/PKS0507+17_onoff_stacked_pha_on.fits'
Apparently csphagen terminates succesfully (see log file).
PKS0507+17_sim_csphagen.log
The whole analysis is in the compressed file at this link:
https://www.dropbox.com/s/dyg7n513xo1fxia/EBL_10h_piv300GeV.tar.gz?dl=0
To test the analysis run Fit_DC1_Spectra.py
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.