CTA IRAP Project Gateway: Issueshttps://cta-redmine.irap.omp.eu/https://cta-redmine.irap.omp.eu/favicon.ico?14312453732020-11-24T15:45:33ZCTA IRAP Project Gateway
Redmine GammaLib - Action #3463 (New): Add "RING" method to GSkyMap smooth and correlatehttps://cta-redmine.irap.omp.eu/issues/34632020-11-24T15:45:33ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<p>A <code>RING</code> correlation method is used in <code>ctskymap</code>, it may be good to have this method also available in the <code>GSkyMap::correlate()</code> and <code>GSkyMap::smooth()</code> methods.</p> GammaLib - Feature #2190 (In Progress): Add GammaLib code generatorhttps://cta-redmine.irap.omp.eu/issues/21902017-09-02T15:37:58ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<p>A code generation script should be added to automatically generate new classes, and in particular new instrument modules.</p> ctools - Support #1950 (In Progress): 'invalid background response tables' with ctobssimhttps://cta-redmine.irap.omp.eu/issues/19502017-03-13T14:53:58ZEschbach Stefanstefan.eschbach@fau.de
<p>Hi,</p>
<p>My name is Stefan, I’m a phd student, new to ctools and could need some help <span class="wiking smiley smiley-smiley2" title="=)"></span><br />I want to do simulations of HESS paris data with realistic IRFs. Therefore, I use csfindobs and csiactobs to get all runs to a certain source positions (at the moment crab) and use the received obsdef- and model- file as input for ctobssim. (Maybe this is not the best way to go, see closing thoughts.)</p>
<p>I have just installed the new ctools version 1.2.0, and now I always get the error that my simulated energies are not covered by the background response table. (Did’t appear in 1.1.0). The problem is that I set 'emin’ and 'emax’ for ctobssim globally for all runs in the simulation, and there always seems to be another background table that doesn’t fit, no matter how I adjust emin and emax! I could use only runs with a certain alt/az position, so that only one background response file is used, but I think that’s a bad workaround... Is there any method implemented to extrapolate the range of the bgkresponse tables or something? How did it work before the new version?</p>
<p>Closing thoughts: Maybe my method is stupid anyway. It could be better to pick a certain run (how to decide which?^^) with a certain IRF, so that i get only one observation definition, and then simulate events for a certain timing window. It would be nice if you could comment on that as well <span class="wiking smiley smiley-smiley2" title="=)"></span></p>
<p>Thanks in advance!!</p>
<p>Best regards,<br />Stefan Eschbach</p> ctools - Action #1941 (New): A ctobsselect run should preserve any environment variables in the X...https://cta-redmine.irap.omp.eu/issues/19412017-03-03T16:06:26ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<p>Any environment variables in the XML file should be preserved. For the moment, the input XML file<br /><pre>
<observation_list title="observation list">
<observation name="GC" id="000001" instrument="CTA">
<parameter name="Pointing" ra="266.5963" dec="-29.6233" />
<parameter name="GoodTimeIntervals" tmin="662774400" tmax="662776200" />
<parameter name="TimeReference" mjdrefi="51544" mjdreff="0.5" timeunit="s" timesys="TT" timeref="LOCAL" />
<parameter name="RegionOfInterest" ra="266.5963" dec="-29.6233" rad="5" />
<parameter name="Deadtime" deadc="0.95" />
<parameter name="Calibration" database="prod3b" response="South_z20_50h" />
<parameter name="EventList" file="$CTADATA/data/baseline/gc/gc_baseline_000001.fits.gz" />
</observation>
</pre><br />converts into<br /><pre>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<observation_list title="observation list">
<observation name="GC" id="000414" instrument="CTA">
<parameter name="EventList" file="/Users/jurgen/analysis/cta/dc/1dc/validation/milano-noedisp/1dc.pre/data/baseline/gc/gc_baseline_000414.fits.gz" />
<parameter name="Calibration" database="prod3b" response="South_z20_50h" />
</observation>
</pre></p> GammaLib - Feature #1753 (New): Add GCTAEventBin arithmetic operatorshttps://cta-redmine.irap.omp.eu/issues/17532016-04-04T12:21:45ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<p>Addition, subtraction, multiplication and division operators should be added to <code>GCTAEventBin</code> so that event bin values can be added, subtracted, multiplied or divided.</p> GammaLib - Feature #1665 (New): Add GUnit class that handles FITS unit conventionshttps://cta-redmine.irap.omp.eu/issues/16652016-02-12T20:14:00ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<p>A GUnit class should be implemented that take a unit string and decomposes it in the basic unit, a scale factor and an exponent. Note that within a string, several quantities may be given (e.g. ph cm^2 s^2). Details of the unit definition are given in the attached document.</p> ctools - Feature #1454 (New): Add check for binned and unbinned analysis to ctool::get_observatio...https://cta-redmine.irap.omp.eu/issues/14542015-03-30T11:43:55ZMayer Michaelmichael.mayer@physik.hu-berlin.de
Currently, we have different <code>ctools</code> to perform different steps of the analysis. Some of them however, only work in case we pass an observation container of unbinned cta observations. Saying it the other way round: many tools fail if the observations contain at least one binned <code>GCTAObservation</code>:
<ul>
<li><code>ctselect</code></li>
<li><code>ctbin</code></li>
<li><code>ctexpcube</code></li>
<li><code>ctpsfcube</code></li>
<li><code>ctbkgcube</code></li>
<li><code>csspec</code></li>
</ul>
<p>And probably some others, too. The thrown errors are mostly because RoI information cannot be found. To make the exceptions more meaningful, we might want to add an option to <code>ctool::get_observations</code>, like <code>require_unbinned</code> which throws a meaningful error like “This tool requires an unbinned observation container”.</p> GammaLib - Feature #1234 (New): Add a way to create IRF classes directly without needing FITS fileshttps://cta-redmine.irap.omp.eu/issues/12342014-06-26T07:30:51ZDeil ChristophDeil.Christoph@gmail.com
<p>Currently most of the Gammalib IRF classes can only be initialised via a FITS file.</p>
<p>For science parameter and sensitivity studies as well as for debugging it would be nice if there were a way to create initialised IRF classes directly by passing the required parameters / tables / histogram (whatever is needed and read from file at the moment) directly.</p>
<p>As an example, let’s say I would like to do a computation how the sensitivity to distinguish Gauss or Shell morphology on the PSF width.<br />The spatial models take the relevant parameters as input and it’s easy to construct them how I want.</p>
<p>But for the PSF I currently see no way to vary the width except to manually inspect the FITS format for the example test files and writing code that manually generates exactly that file format, just so that I can get a PSF of the width I want. See e.g. <a class="external" href="http://gammalib.sourceforge.net/doxygen/classGCTAPsfKing.html">http://gammalib.sourceforge.net/doxygen/classGCTAPsfKing.html</a></p>
<p>I guess it’s a lot of work to add these extra constructors for all the IRF classes ... Jürgen, do you think it’s worth it?</p> ctools - Feature #1152 (New): Add ctool for quick look and checkshttps://cta-redmine.irap.omp.eu/issues/11522014-02-25T11:31:03ZDeil ChristophDeil.Christoph@gmail.com
<p>There should be a ctool (using Python / matplotlib) that can create a few common plots for quick look and checks, e.g.</p>
<ul>
<li>count, model and residual image at one or a few correlation radii</li>
<li>count, model and residual spectrum at for the whole field of view or a user-defined region.</li>
</ul>
<p>Ideally this script would have a few parameters like energy band for the image or region for the spectrum the user can select to get the plot she wants.</p>
<p>Here’s an example of plots I’d mean:<br /><a class="external" href="http://enrico.readthedocs.org/en/latest/tutorial.html#check-results">http://enrico.readthedocs.org/en/latest/tutorial.html#check-results</a></p>
<p>There is already some example code in the ctools repo:<br /><a class="external" href="https://github.com/ctools/ctools/blob/devel/examples/make_binned_analysis.py#L243">https://github.com/ctools/ctools/blob/devel/examples/make_binned_analysis.py#L243</a></p>
<p>What is needed is turning this into a command line tool and adding documentation to the ctools user manual.</p>
<p>Anyone has time to share their existing scripts now or implement this?</p> GammaLib - Feature #1070 (New): Add @make install-no-doxygen@ target (or document it in @make hel...https://cta-redmine.irap.omp.eu/issues/10702014-01-09T14:31:00ZDeil ChristophDeil.Christoph@gmail.com
<p>See <a class="external" href="https://cta-redmine.irap.omp.eu/issues/1048#note-2">https://cta-redmine.irap.omp.eu/issues/1048#note-2</a></p> GammaLib - Bug #1000 (New): ASCII table has wrong content in second saving of Python unit testhttps://cta-redmine.irap.omp.eu/issues/10002013-11-21T01:17:06ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<p>The Python unit test creates two files<br /><pre>
test_python_fits_v1.fits
test_python_fits_v2.fits
</pre>containing images, an ASCII and a binary table. While the ASCII table after the first saving seems to be correct (file <code>test_python_fits_v1.fits</code>), the table after loading and re-saving has a wrong content (file <code>test_python_fits_v2.fits</code>). Also, the first file has a NAXIS1 value of 114, the second of 129, although the number of columns is identical and all TFORM and TBCOL keywords are identical.</p> GammaLib - Feature #612 (New): Add Monte Carlo simulation support to COMPTEL interface.https://cta-redmine.irap.omp.eu/issues/6122012-12-04T21:31:30ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<p>So far, the support of Monte Carlo simulations has not been implemented into the COMPTEL interface (see <a href="https://cta-redmine.irap.omp.eu/issues/607" class="issue tracker-6 status-5 priority-4 priority-default closed child" title="Implement background handling (Closed)">#607</a>).</p>
The following methods need to be implemented:
<ul>
<li><code>GCOMModelDRBFitting::npred</code></li>
<li><code>GCOMModelDRBFitting::mc</code></li>
</ul> ctools - Feature #585 (New): Add api-sanity-checker on Jenkins for ctoolshttps://cta-redmine.irap.omp.eu/issues/5852012-11-02T17:51:33ZDeil ChristophDeil.Christoph@gmail.com
<p>We already run the api-sanity-checker for gammalib (see issue <a href="https://cta-redmine.irap.omp.eu/issues/579" class="issue tracker-2 status-5 priority-4 priority-default closed" title="Add API Sanity Checker on Jenkins (Closed)">#579</a>) and it’s discovered (admittedly extremely few given the size of the library) problems:<br /><a class="external" href="https://cta-jenkins.irap.omp.eu/job/gammalib-sanity/API_Sanity_Checker_report/">https://cta-jenkins.irap.omp.eu/job/gammalib-sanity/API_Sanity_Checker_report/</a>?</p>
<p>Although this is much less common, the ctools can also be used as a C++ library (e.g. one could wrap or subclass a ctool GApplication in another C++ or python tool).<br />Running it through the the api-sanity-checker can be useful to avoid any program crashes or hangs.</p>
<a name="How-to-run-the-api-sanity-checker-on-the-ctools-API"></a>
<h2 >How to run the api-sanity-checker on the ctools API<a href="#How-to-run-the-api-sanity-checker-on-the-ctools-API" class="wiki-anchor">¶</a></h2>
<p>It’s not trivial to generate the ctools tests without generating also the gammalib tests, as far as I can see there’s no option to give it the gammalib header include path, I’ve asked how to do this here:<br /><a class="external" href="https://github.com/lvc/api-sanity-checker/issues/1">https://github.com/lvc/api-sanity-checker/issues/1</a></p>
<p>For now a workaround is to add <code>GammaLib.hpp</code> to the <code>headers</code> section in <code>VERSION.xml</code><br /><pre>
<version>0.0</version>
<headers>
/home/deil/software/code/ctools/src
/usr/local/gamma/include/gammalib/GammaLib.hpp
</headers>
<libs>/usr/local/gamma/lib</libs>
</pre><br />and then to explicitly only generate tests for each ctools header file one by one:<br /><pre>
api-sanity-checker -lib libctools -d VERSION.xml -header ctskymap.hpp -gen -build -run
api-sanity-checker -lib libctools -d VERSION.xml -header ctobssim.hpp -gen -build -run
api-sanity-checker -lib libctools -d VERSION.xml -header ctlike.hpp -gen -build -run
api-sanity-checker -lib libctools -d VERSION.xml -header ctbin.hpp -gen -build -run
api-sanity-checker -lib libctools -d VERSION.xml -header ctselect.hpp -gen -build -run
</pre></p>
<a name="Segfaults-found"></a>
<h2 >Segfaults found<a href="#Segfaults-found" class="wiki-anchor">¶</a></h2>
<a name="ctlike"></a>
<h3 >ctlike<a href="#ctlike" class="wiki-anchor">¶</a></h3>
<p>The catlike copy constructor and operator= segfault because in line 506 of <code>ctlike.cpp</code> the NULL pointer <code>app.m_opt</code> is dereferenced:<br /><pre>
m_opt = app.m_opt->clone();
</pre><br />Here’s the test code for the first failure:<br /><pre>
#include <ctlike/ctlike.hpp>
int main(int argc, char *argv[])
{
GObservations obs;
ctlike app(obs);
ctlike* obj = new ctlike(app); //target call
return 0;
}
</pre></p>
<p>Is there a single use case to ever copy a GApplication?<br />If not I’d recommend making the copy constructor and operator= empty and private to disable copying of GApplications.</p>
<a name="ctselect"></a>
<h3 >ctselect<a href="#ctselect" class="wiki-anchor">¶</a></h3>
<p>ctselect segfaults for this test case:<br /><pre>
#include <ctselect/ctselect.hpp>
int main(int argc, char *argv[])
{
GObservations obs;
ctselect* obj = new ctselect(obs);
std::basic_string<char> instrument = "instrument";
GCTAObservation* obs_1 = new GCTAObservation(instrument);
std::basic_string<char> filename = "testdata/sample.txt";
obj->select_events(obs_1, filename); //target call
return 0;
}
</pre></p>
<p>The crash occurs in line 495 of <code>ctselect.cpp</code> because the NULL pointer <code>pnt</code> is dereferenced:<br /><pre>
$ cat tests/libctools/0.0/run_fail_list
tests/libctools/0.0/groups/ctselect/classes/ctselect/_ZN8ctselect13select_eventsEP15GCTAObservationRKSs
deil@ubuntu:~/software/code/ctools_sanity$ gdb tests/libctools/0.0/groups/ctselect/classes/ctselect/_ZN8ctselect13select_eventsEP15GCTAObservationRKSs/test
...
(gdb) run
Starting program: /home/deil/software/code/ctools_sanity/tests/libctools/0.0/groups/ctselect/classes/ctselect/_ZN8ctselect13select_eventsEP15GCTAObservationRKSs/test
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
ctselect::select_events (this=0x606ae0, obs=0x608630, filename=...) at ctselect.cpp:495
495 ra = pnt->dir().ra_deg();
(gdb) print pnt
$1 = (const GCTAPointing *) 0x0
</pre></p> GammaLib - Action #569 (New): Add acceptance readerhttps://cta-redmine.irap.omp.eu/issues/5692012-10-15T14:09:49ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<p>The HESS acceptance (background shape and spectrum), should be implemented using a map cube. The MapCube model type (implemented by <code>GModelSpatialCube</code>) can be used to realize this model.</p>
<p>We have to introduce a model <code>GCTAModelAcceptance</code> that allows specifying a <code>GModelSpatialCube</code> as background model.</p> GammaLib - Feature #487 (New): Add developer info wiki page on how to develop GammaLib with an ID...https://cta-redmine.irap.omp.eu/issues/4872012-09-16T16:29:00ZDeil ChristophDeil.Christoph@gmail.com
<p>It would be nice to have some info on how to develop GammaLib with an IDE like Eclipse or XCode.<br />There are many advantages like auto code formatting, code completion, static code analysis, links from build warnings / errors to code lines, ...<br />However it’s not obvious and sometimes not even possible to configure the project correctly in the IDE so that everything works, and if someone has figured this stuff it would be nice to add a short description on the developer wiki pages.</p>
<p>One thing I did was check out the git repo via the command line and then in Eclipse CDT:<br />Import → Existing Code as Makefile Project → Select MacOSX GCC toolchain for the indexer.<br />Right-click Project → Index → Rebuild (takes a few seconds)<br />Right-click Project → Run C/C++ Code Analysis (takes a minute)</p>
<p>The CODAN static analyzer shows 20 errors, but I believe that is a CODAN error and gammalib is fine:<br /><a class="external" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=389676">https://bugs.eclipse.org/bugs/show_bug.cgi?id=389676</a></p>
<p>It also shows three warnings, which we might as well fix:<br />Description Resource Path Location Type<br />Member 'm_sigma’ was not initialized in this constructor test_GNumerics.hpp /gammalib/test line 52 Code Analysis Problem<br />Member 'm_num’ was not initialized in this constructor test_GVector.hpp /gammalib/test line 33 Code Analysis Problem<br />Catching by reference is recommended 'GException::matrix_not_factorised’ test_GSparseMatrix.cpp /gammalib/test line 988 Code Analysis Problem</p>
<p>Code completion, outline, and navigation work fine (except for the one bug mentioned above), so it’s already quite useful.</p>
<p>TODO:<br />- How to build from Eclipse? There is the option to import as an autotools project, but I didn’t try that yet.<br />- How to run unit tests from Eclipse?<br />- Why doesn’t Eclipse automatically recognize that this is a git repo? It did that for all other projects I imported previously.</p>
<p>Really on Mac, XCode with Clang on the fly compilation / code analysis should be better than Eclipse, but I didn’t try that yet.</p>