Changeset 3442 in Sophya for trunk/SophyaLib/Manual/piapp.tex
- Timestamp:
- Dec 15, 2007, 1:09:53 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Manual/piapp.tex
r3441 r3442 422 422 \newpage 423 423 \section{Interactive graphics} 424 \label{intgraphics} 424 425 %%% 425 426 \subsection{Display commands} … … 448 449 % \newpage 449 450 \begin{enumerate} 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 451 \label{francetopo} 452 \item Image display. The following example uses the data file francetopo.ppf 453 which can be found in the {\bf DemoData} directory. This PPF file contains 454 a TMatrix$<$int\_2$>$ (short integers) representing 30 arcmin gridded 455 ($\sim$ 1 km N-S $\times$ 0.7 km E-W) elevation (or altitude) 456 for the area centered on France. It has been made using topographic 457 data (DEM: Digital Elevation Model) available from the {\bf N}ational 453 458 {\bf G}eophysical {\bf D}ata {\bf C}enter 454 \href{http://www.ngdc.noaa.gov/mgg/topo/ globeget.html}{({\bf NGDC})}.459 \href{http://www.ngdc.noaa.gov/mgg/topo/}{({\bf NGDC/GLOBE})} 455 460 \footnote{NGDC web site: \hspace{5mm} 456 http://www.ngdc.noaa.gov/mgg/topo/globeget.html } 461 http://www.ngdc.noaa.gov/ }. 462 In section \ref{tableplot}, an example shows how to use this data set to 463 create altitude distribution histogram for selected regions. 457 464 \begin{verbatim} 458 465 # Open a PPF file containing topographic data for france … … 866 873 \href{http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html} 867 874 Data is usually read from FITS files as vectors, images, cubes or tables. 868 A subset of SOPHYA objects can be exported in FITS format.875 A subset of SOPHYA objects can be imported or exported in FITS format. 869 876 \item[\bul] PPF (Portable Persistence file Format) is the native SOPHYA 870 877 data format. … … 968 975 969 976 The following commands shows how to open a FITS file containing a synchrotron map 970 of our galaxy. This file has been made, by rebinning, from the Haslam 408 MHz 977 of our galaxy. This file contains sky emission at 408 MHz, 978 as brightness temperature, represented as a SOPHYA spherical map 979 (SphereHEALPix$<$r\_4$>$) in \href{http://healpix.jpl.nasa.gov/}{\bf HEALPix} 980 format \footnote{HEALPix home page: \hspace{5mm} http://healpix.jpl.nasa.gov/}. 981 It has been made, by rebinning, from the Haslam 408 MHz 971 982 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/} 983 \href{http://lambda.gsfc.nasa.gov/}{\bf LAMBDA} 984 \footnote{LAMBDA web site: \hspace{5mm} http://lambda.gsfc.nasa.gov/}. 985 \label{syncmap} 974 986 \begin{verbatim} 975 987 # Open the fits file : the map is in HEALPix format … … 983 995 \begin{center} 984 996 \includegraphics[width=15cm]{syncmap.eps} 985 \caption{Synchron map of our Galaxy, displayed in Molleweide projection} 997 \caption{Synchron map of our Galaxy, displayed in Molleweide projection. 998 The underlying SOPHYA object is a \tcls{SphereHEALPix} } 986 999 \end{center} 987 1000 \end{figure} … … 995 1008 996 1009 Piapp graphic output can be exported in postscript (level 2) or 997 encapsulated postscript format. 1010 encapsulated postscript format, preserving the full precision 1011 of vector graphics. 998 1012 Postscript (.ps) files my contain several pages, each vue or window 999 1013 corresponding to one page and are suitable for direct printing. … … 1004 1018 Postscript file can easily be converted to other formats, 1005 1019 PDF or image formats (jpeg \ldots) using converters like 1006 {\bf ps2pdf} or { imagemagick}.1020 {\bf ps2pdf} or {\bf imagemagick}. 1007 1021 1008 1022 The menu items under \menubar{PostScript} can be used to export … … 1143 1157 \end{verbatim} 1144 1158 \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 1159 \item Compute the histogram of pixel values for a \tcls{SphreHEALPix}. 1160 The data come from the synchrotron map (syncmap.fits), described page \pageref{syncmap}. 1161 \begin{verbatim} 1162 # Open the synchrotron map file (HEALPix format spherical map) 1150 1163 # The file can be found in directory DemoData/ 1151 1164 readfits syncmap.fits 1165 newwin 1 1 800 400 1166 disp syncmap 'lut=lin,2,50 midas_bluered' 1167 newwin 1 2 1152 1168 # Compute and display the pixel value histogram (brightness temperature) 1153 n/plot syncmap.val val<200 ! ! 'font=helvetica,bold,16 '1169 n/plot syncmap.val val<200 ! ! 'font=helvetica,bold,16 notit' 1154 1170 settitle 'Sky brightness @ 408 MHz' ' ' 'font=helvetica,bold,16' 1171 # display the pixel value histogram in the galactic plane 1172 n/plot syncmap.val val<200&&(fabs(teta-M_PI/2)<0.025) ! ! 'red notit' 1173 settitle '408 MHz - Galactic plane' ' ' 'font=helvetica,bold,16 red' 1155 1174 \end{verbatim} 1156 1175 \vspace*{4mm} … … 1167 1186 zone 1 2 1168 1187 # Draw a longitude-latitude grid in Molleweide projection 1169 mollgrid 5 7 'axesnone black font=helvetica,roman,12 '1188 mollgrid 5 7 'axesnone black font=helvetica,roman,12 notit' 1170 1189 # Overlay the sources distribution from UZC, for bright objects (mag<14) 1171 1190 plot2d uzc longlat2mollX(ra*15,dec) longlat2mollY(dec) mag<14 \ … … 1180 1199 'same nsta red marker=circle,5' 1181 1200 \end{verbatim} 1201 %%%%%%%%%%%%%%%% 1202 %%%%%%%%%%%%%%%% 1203 \item Analysis of elevation (altitude) data for france. We use the francetopo.ppf 1204 data set described page \pageref{francetopo}. 1205 \begin{verbatim} 1206 # open and display the topographic data for france 1207 openppf francetopo.ppf (in DemoData/ directory) 1208 print francetoto 1209 #--- TMatrix<s>(NRows=1332, NCols=1548) ND=2 SizeX*Y*...= 1548x1332 --- 1210 disp francetopo 'zoom/2 imagecenter=750,700 lut=lin,-700,800 colbr128' 1211 # Compute the altitude distribution 1212 newh1d altf 0. 4000 100 1213 projh1d altf francetopo val val>0.1 1214 # Display the histogram overlayed on the topographic map 1215 disp altf 'white line=solid,2 font=helvetica,bold,14 inset=0.1,0.6,0.45,0.9' 1216 # Compute altitude distribution for the massif central (Auvergne) 1217 newh1d altmc 0. 2000 100 1218 # We select the region as a circle of radius 200, centered on x=c=970,y=r=920 1219 set regcut (sqrt((c-970)*(c-970)+(r-920)*(r-920))<200) 1220 projh1d altmc francetopo val (val>0.1)&&$regcut 1221 # Create a new window and display the two histograms 1222 newwin 1 2 1223 setaxesatt 'font=helvetica,bold,16 fixedfontsize' 1224 disp altf 'notit' 1225 settitle 'Elevation (altitude) distribution over France' ' ' \ 1226 'font=helvetica,bold,16' 1227 disp altmc 'notit' 1228 settitle 'Elevation (altitude) distribution over MassifCentral' ' ' \ 1229 'font=helvetica,bold,16' 1230 \end{verbatim} 1182 1231 \end{enumerate} 1183 1232 1184 \begin{figure}[ p]1233 \begin{figure}[hp] 1185 1234 \includegraphics[width=15cm]{exhis2dpl.eps} 1186 1235 \caption{
Note:
See TracChangeset
for help on using the changeset viewer.