Changeset 3439 in Sophya for trunk/SophyaLib/Manual
- Timestamp:
- Dec 13, 2007, 11:49:04 AM (18 years ago)
- Location:
- trunk/SophyaLib/Manual
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Manual/piapp.tex
r3438 r3439 151 151 contain {\tt \$SOPHYABASE /exe}. Refer to the SOPHYA overview manual 152 152 for more information on SOPHYA directory structure. \\ 153 It might also be necessary to define the environment variable154 {\bf PIXKBMOMASK}, used by the libPI.a to map correctly155 the {\tt <Alt>} key with some X servers (in particular with156 X11 on MacOS X). \\157 {\tt csh> setenv PIXKBMODMASK 2 }158 153 \par 159 154 {\tt (s)piapp -h} provides a brief help of the command line … … 192 187 commands can be entered in this widget. It is also possible to keep 193 188 the terminal where piapp was started for {\tt stdout/stderr} (flag {\tt -nored}). 194 It is also possible to have a command reader on the terminal 195 ({\tt stdin}), using the flag {\tt -term}. \\[1mm] 196 % 197 {\bf Warning:} The output redirection uses unix pipes. On Linux, with commands 198 producing long outputs, the application may block because of incorrect management 199 of pipes. If this happens, use piapp with {\tt -nored} flag. This problem has been 200 in principle solved with SOPHYA V=2.1 / piapp V=4.1 189 The flag {\tt -term} activate a command reader on the terminal 190 It is also possible to have a command reader on the terminal ({\tt stdin}). \\[1mm] 201 191 202 192 \par … … 208 198 and help items. Various interactive control windows are described in appendix. 209 199 200 \subsection{DemoPIApp and DemoData} 201 The directory {\bf DemoPIApp} contains a number of example scripts, such as the 202 {\tt demo.pic} and the associated data file {\tt demo.ppf}. It contains 203 also examples of loadable modules for piapp. The DemoPIApp/CONTENT 204 file contains a brief description of the different files. \\ 205 The {\bf DemoData} contains a number of data files, in PPF and FITS format, which are 206 used for the examples in this document. 207 208 \subsection{Warnings/Known problems} 209 \begin{enumerate} 210 \item It might be necessary to define the environment variable 211 {\bf PIXKBMOMASK}, used by the libPI.a to map correctly 212 the {\tt <Alt>} key with some X servers (in particular with 213 X11 on MacOS X). \\ 214 {\tt csh> setenv PIXKBMODMASK 2 } 215 However, the default value has been changed in PI/piapp V=4.1 and it should not be 216 necessary anymore to define PIXKBMODMASK. 217 %% 218 \item The output redirection uses unix pipes. On Linux, with commands 219 producing long outputs, the application may block because of incorrect management 220 of pipes. If this happens, use piapp with {\tt -nored} flag. This problem has been 221 in principle solved with SOPHYA V=2.1 / piapp V=4.1 222 \end{enumerate} 210 223 211 224 \newpage … … 232 245 command script and sample data files. 233 246 234 \subsection{ the Object Manager (NamedObjMgr)}247 \subsection{The Object Manager (NamedObjMgr)} 235 248 The {\bf piapp} application is built around an object manager 236 249 (class {\tt NamedObjMgr}) and a graphic application … … 318 331 It is possible to plot various expressions of objects, seen as 319 332 a 2D table, with named columns. This possibility exist not only 320 for NTuples , but also for most objects (from SOPHYA) handled321 by piapp. See command groups{\bf Expr.Plotting} and322 {\bf pawCmd} 333 for NTuples/DataTables, but also for most objects (from SOPHYA) handled 334 by piapp. The related commands are grouped under {\bf Expr.Plotting} and 335 {\bf pawCmd} and are described in section \ref{tableplot}. 323 336 324 337 \subsection{C++ execution inside piapp} … … 364 377 \end{verbatim} 365 378 366 See command group {\bf CxxExecutorCmd} for more information, 367 and the option window activated by the menu: 368 {\bf Special/CxxExecOption}. 379 See section \ref{flycplusplus} and command group {\bf CxxExecutorCmd} 380 for more information. 369 381 370 382 \subsection{Extending the application} … … 433 445 {\bf w2eps} \myppageref{w2eps} as well the menu \menubar{PostScript} can 434 446 be used to export graphics. \\[2mm] 435 The examples in the follow wing pages illustrates the usage of some piapp graphic commands.436 \newpage447 The examples in the following pages illustrates the usage of some piapp graphic commands. 448 % \newpage 437 449 \begin{enumerate} 438 \item Image display 450 \item Image display. The following example uses the data file francetop.ppf 451 which can be found in the {\bf DemoData} directory. This PPF file has been 452 made using topographic satellite data available from the {\bf N}ational 453 {\bf G}eophysical {\bf D}ata {\bf C}enter 454 \href{http://www.ngdc.noaa.gov/mgg/topo/globeget.html}{({\bf NGDC})}. 455 \footnote{NGDC web site: \hspace{5mm} 456 http://www.ngdc.noaa.gov/mgg/topo/globeget.html } 439 457 \begin{verbatim} 440 458 # Open a PPF file containing topographic data for france 441 459 # as a TMatrix<short> 1332x1548 460 # The file is in the directory DemoData/ 442 461 openppf francetopo.ppf 443 462 # Display the matrix, whit a zoom factor, lut and color map … … 949 968 950 969 The following commands shows how to open a FITS file containing a synchrotron map 951 of our galaxy: 970 of our galaxy. This file has been made, by rebinning, from the Haslam 408 MHz 971 all sky survey map, available from the NASA CMB data repository 972 \href{http://lambda.gsfc.nasa.gov/}{\bf LAMBDA}. 973 \footnote{LAMBDA web site: \hspace{5mm} http://lambda.gsfc.nasa.gov/} 952 974 \begin{verbatim} 953 975 # Open the fits file : the map is in HEALPix format … … 1095 1117 \end{itemize} 1096 1118 1119 %%%%% 1120 \subsection{Examples} 1121 The following examples illustrates the use of some Expression Plotting commands 1122 (see the command groups {\bf Expr. Plotting} \myppageref{ExprZZPlotting} and 1123 {\bf pawCmd} \myppageref{pawCmd}). 1124 The {\bf pawCmd} defines a number of operations with command name and syntax 1125 similar to the CERN PAW program. 1126 The graphic output from the examples below are shown in the figures 1127 \ref{exhis2dpl} and \ref{uzcpos}. 1128 \begin{enumerate} 1129 \item 2D plot with error bars \\[1mm] 1130 \begin{verbatim} 1131 # Set the axes attibute (the font used for axes ...) 1132 setaxesatt 'font=helvetica,bold,16 minorticks fixedfontsize' 1133 # Open the file demo.ppf (in DemoPIApp) 1134 openppf demo.ppf 1135 print nt21 1136 print nt22 1137 # 2D plot directly from the NTuple columns (nt2d) 1138 # nt2d DO NOT use a compiled c file 1139 nt2d nt21 x y - - - - 'font=helvetica,bold,16' 1140 # Overlay a plot with scaled error bars from nt22 1141 plot2de nt22 x y ex*0.3 ey*0.5 1 \ 1142 'same marker=box,7 red font=helvetica,bold,16 ' 1143 \end{verbatim} 1144 \vspace*{4mm} 1145 \item Compute the histogram of pixel values for a spherical map. 1146 syncmap.fits has been made from Haslam 408 MHz map 1147 available from NASA \href{http://lambda.gsfc.nasa.gov/}{\bf LAMBDA} data server. \\[1mm] 1148 \begin{verbatim} 1149 # Open the synchrotron map file 1150 # The file can be found in directory DemoData/ 1151 readfits syncmap.fits 1152 # Compute and display the pixel value histogram (brightness temperature) 1153 n/plot syncmap.val val<200 ! ! 'font=helvetica,bold,16' 1154 settitle 'Sky brightness @ 408 MHz' ' ' 'font=helvetica,bold,16' 1155 \end{verbatim} 1156 \vspace*{4mm} 1157 \item Sources (galaxies) distribution over the sky. The data used below (uzc.ppf) 1158 has been extracted from the {\bf U}pdated {\bf Z}wicky {\bf C}atalog of Galaxies, 1159 available from the Harvard-Smithsonian Center For Astrophysics 1160 \href{http://tdc-www.harvard.edu/uzc/}{CfA/UZC web site}. 1161 \footnote{CfA web site: \hspace{5mm} http://tdc-www.harvard.edu/uzc/} \\[1mm] 1162 %%% 1163 \begin{verbatim} 1164 # Keep the synchrotron map 1165 # Open the Updated Zwicky Catalog of galaxies (in DemoData) 1166 openppf uzc.ppf 1167 zone 1 2 1168 # Draw a longitude-latitude grid in Molleweide projection 1169 mollgrid 5 7 'axesnone black font=helvetica,roman,12' 1170 # Overlay the sources distribution from UZC, for bright objects (mag<14) 1171 plot2d uzc longlat2mollX(ra*15,dec) longlat2mollY(dec) mag<14 \ 1172 'same red marker=circle,5' 1173 # Change the plot title 1174 settitle 'RA-Dec in degrees UZC (Updated Zwicky Catalog)' ' ' \ 1175 'font=helvetica,bold,16 red' 1176 # Display the synchrotron map 1177 disp syncmap 'lut=lin,2,40 grey128' 1178 # Add the source distribution in Galactic coordinates 1179 plot2d uzc longlat2mollX(glong,glat) longlat2mollY(glat) mag<14 \ 1180 'same nsta red marker=circle,5' 1181 \end{verbatim} 1182 \end{enumerate} 1183 1184 \begin{figure}[p] 1185 \includegraphics[width=15cm]{exhis2dpl.eps} 1186 \caption{ 1187 top: 2d plot example with error bars \hspace{5mm} 1188 bottom: Histogram of pixel values from the synchrotron map 1189 of our galaxy} 1190 \label{exhis2dpl} 1191 \end{figure} 1192 1193 \begin{figure}[p] 1194 \includegraphics[width=15cm]{uzcpos.eps} 1195 \caption{UZC: Updated Zwicky Catalog. \hspace{5mm} 1196 top: The galaxy position distribution in equatorial 1197 $(\alpha, \delta)$ coordinates. \hspace{5mm} 1198 bottom: Position distribution in Galactic coordinates, superimposed on 1199 the synchrotron map.} 1200 \label{uzcpos} 1201 \end{figure} 1202 1097 1203 %%%%%%%%%%%%%%% Section 6 : command interpreter 1098 1204 \newpage … … 1394 1500 \newpage 1395 1501 \section{On the fly C++ execution} 1502 \label{flycplusplus} 1503 and the option window activated by the menu: 1504 {\bf Special/CxxExecOption}. 1396 1505 1397 1506 %%%%%%%%%%%%%%% Section 8 : command reference
Note:
See TracChangeset
for help on using the changeset viewer.