diff --git a/cscripts/csmodelinfo.py b/cscripts/csmodelinfo.py index bb1503d..ac520b5 100644 --- a/cscripts/csmodelinfo.py +++ b/cscripts/csmodelinfo.py @@ -89,13 +89,13 @@ class csmodelinfo(ctools.cscript): pars.append(gammalib.GApplicationPar("pnt_mark_size","i","h","12","","","Marker size for point sources")) pars.append(gammalib.GApplicationPar("show_labels","b","h","yes","yes|no","","Add source labels?")) pars.append(gammalib.GApplicationPar("width","i","h","2","","","Line width for regions")) - pars.append(gammalib.GApplicationPar("font","s","h","helvetica","","","Font for source labels")) + pars.append(gammalib.GApplicationPar("font","s","h","helvetica","helvetica|times|courier","","Font for source labels")) pars.append(gammalib.GApplicationPar("fontsize","i","h","12","","","Font size for source labels")) - pars.append(gammalib.GApplicationPar("fonttype","s","h","normal","normal|bold","","Normal or bold font?")) + pars.append(gammalib.GApplicationPar("fonttype","s","h","normal","normal|bold","","Use normal or bold font?")) pars.append(gammalib.GApplicationPar("fonttype2","s","h","roman","roman|italic","","Use roman or italic font?")) pars.append(gammalib.GApplicationPar("show_ext_type","b","h","yes","yes|no","","Show type of extended model in source name")) pars.append(gammalib.GApplicationPar("free_color","s","h","green","","","Color for sources with free parameters (any ds9 color or hex code)")) - pars.append(gammalib.GApplicationPar("fixed_color","s","h","magenta","","","Color for source with fixed parameters (any ds9 color or hex code)")) + pars.append(gammalib.GApplicationPar("fixed_color","s","h","magenta","","","Color for source without free parameters (any ds9 color or hex code)")) pars.append_standard() pars.append(gammalib.GApplicationPar("logfile","f","h","csmodelinfo.log","","","Log filename")) pars.save(parfile) @@ -473,7 +473,8 @@ class csmodelinfo(ctools.cscript): ds9string += "color="+color+" " ds9string += "width="+str(self.width)+" " ds9string += "font=\""+self.font+" "+str(self.fontsize)+" "+self.fonttype+" "+self.fonttype2+"\" " - ds9string += "text={"+modelname+"}" + if self.show_labels: + ds9string += "text={"+modelname+"}" # Return string return ds9string diff --git a/doc/source/reference_manual/csmodelinfo.rst b/doc/source/reference_manual/csmodelinfo.rst new file mode 100644 index 0000000..801cb75 --- /dev/null +++ b/doc/source/reference_manual/csmodelinfo.rst @@ -0,0 +1,100 @@ +.. _csmodelinfo: + +csmodelinfo +====== + +Dumps information about a model container into log file or on screen + + +Synopsis +-------- + +This script provides detailled information about a given model container. +It presents the number of parameters, the number of free parameters (sub-divided by +spectral, spatial and temporal type). The tool further creates information about any +parameter that is stuck at the parameter boundaries. This might be quite useful for +debugging a fit. +Finally the tool also list the TS values of each source that was fitted, in order +have a quick overview on these quantities on the screen. + +In addition the tool is also capable of exporting the input model XML container to +a region file which is compatible to be read with ds9 or other displying tools. +To create a region file, the hidden parameter "ds9file" needs to be specified. There +are quite a few further hidden parameters to steer e.g. color, font, etc of the region +file output. + + +General parameters +------------------ + +``inmodel [file]`` + Event list, counts cube, or observation definition file + +``(ds9file = NONE) [file]`` + Output DS9 region file containing models + +``(pnt_type=cross) [string]`` + Marker type for point sources + +``pnt_mark_size [integer]`` + Marker size for point sources + +``(show_labels=yes) [boolean]`` + Add source labels? + +``(width=2) [integer]`` + Line width for regions + + ``(font=helvetica) [string]`` + Font for source labels + +``(fontsize=12) [integer]`` + Font size for source labels + +``(fonttype=normal) [string]`` + Use normal or bold font? + +``(fonttype2=roman) [string]`` + Use roman or italic font? + +``(show_ext_type=yes) [boolean]`` + Show type of extended model in source name? + +``(free_color=green) [string]`` + Color for sources with free parameters (any ds9 color or hex code) + +``(fixed_color=magenta) [string]`` + Color for sources without free parameters (any ds9 color or hex code) + + +Standard parameters +------------------- + +``(chatter = 2) [integer]`` + Verbosity of the executable: + chatter = 0: no information will be logged + + chatter = 1: only errors will be logged + + chatter = 2: errors and actions will be logged + + chatter = 3: report about the task execution + + chatter = 4: detailed report about the task execution + +``(clobber = yes) [boolean]`` + Specifies whether an existing output counts cube should be overwritten. + +``(debug = no) [boolean]`` + Enables debug mode. In debug mode the executable will dump any log file output to the console. + +``(mode = ql) [string]`` + Mode of automatic parameters (default is "ql", i.e. "query and learn"). + +``(logfile = cssens.log) [filename]`` + Log filename. + + +Related tools or scripts +------------------------ + diff --git a/doc/source/reference_manual/index.rst b/doc/source/reference_manual/index.rst index 90aacd6..085bf02 100644 --- a/doc/source/reference_manual/index.rst +++ b/doc/source/reference_manual/index.rst @@ -45,3 +45,5 @@ cscripts csspec --- Computes spectral points csresmap --- Generates residual map cstsdist --- Generates TS distribution + csobsinfo --- Shows detailled information about an observation container + csmodelinfo --- Shows detailled information about a model container