Change request #2182

When cscripts are used from Python they write out a log file

Added by Knödlseder Jürgen over 6 years ago. Updated over 6 years ago.

Status:ClosedStart date:08/25/2017
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.5.0
Duration:

Description

This is not what happens for a ctool, and we want that cscripts behave like ctools.


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 6 years ago

Here is what happens when running a ctools:

>>> import gammalib
>>> import ctools
>>> sim=ctools.ctobssim()
>>> sim.run()
RA of pointing (degrees) (0-360) [83.63] 
Dec of pointing (degrees) (-90-90) [22.01] 
Radius of FOV (degrees) (0-180) [5.0] 
Start time (UTC string, JD, MJD or MET in seconds) [2020-01-01T00:00:00] 
Stop time (UTC string, JD, MJD or MET in seconds) [2020-01-01T00:30:00] 
Lower energy limit (TeV) [0.1] 
Upper energy limit (TeV) [100.0] 
Calibration database [prod2] 
Instrument response function [South_0.5h] 
Input model definition XML file [$CTOOLS/share/models/crab.xml] 
No output file is created.

>>> import gammalib
>>> import ctools
>>> sim=ctools.ctobssim()
>>> sim.execute()
RA of pointing (degrees) (0-360) [83.63] 
Dec of pointing (degrees) (-90-90) [22.01] 
Radius of FOV (degrees) (0-180) [5.0] 
Start time (UTC string, JD, MJD or MET in seconds) [2020-01-01T00:00:00] 
Stop time (UTC string, JD, MJD or MET in seconds) [2020-01-01T00:30:00] 
Lower energy limit (TeV) [0.1] 
Upper energy limit (TeV) [100.0] 
Calibration database [prod2] 
Instrument response function [South_0.5h] 
Input model definition XML file [$CTOOLS/share/models/crab.xml] 
Output event data file or observation definition XML file [events.fits] 
No output file is created.

And here is what happens when running a cscript:

>>> import gammalib
>>> import cscripts
>>> c=cscripts.cscaldb()
>>> c.run()
No output file is created.

>>> import gammalib
>>> import cscripts
>>> c=cscripts.cscaldb()
>>> c.execute()
An output file is created!

Hence the output file creation should be removed from the cscripts::execute() method.

#2 Updated by Knödlseder Jürgen over 6 years ago

  • Status changed from New to Closed
  • Assigned To set to Knödlseder Jürgen
  • % Done changed from 0 to 100

The output file creation has been removed, and the code was merged into devel.

Also available in: Atom PDF