Changeset 3442 in Sophya for trunk/SophyaLib/Manual/piapp.tex


Ignore:
Timestamp:
Dec 15, 2007, 1:09:53 PM (18 years ago)
Author:
ansari
Message:

Ajout d'autres exemples d'expression plotting (sur francetopo.ppf) sur suggestion de cmv - Reza 15/12/2007

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/Manual/piapp.tex

    r3441 r3442  
    422422\newpage
    423423\section{Interactive graphics}
     424\label{intgraphics}
    424425%%%
    425426\subsection{Display commands}
     
    448449% \newpage
    449450\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
     453which can be found in the {\bf DemoData} directory. This PPF file contains
     454a TMatrix$<$int\_2$>$ (short integers) representing  30 arcmin gridded
     455($\sim$ 1 km N-S $\times$ 0.7 km E-W) elevation (or altitude)
     456for the area centered on France. It has been made using topographic
     457data (DEM: Digital Elevation Model) available from the {\bf N}ational
    453458{\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})}
    455460\footnote{NGDC web site: \hspace{5mm}
    456 http://www.ngdc.noaa.gov/mgg/topo/globeget.html }
     461http://www.ngdc.noaa.gov/ }.
     462In section \ref{tableplot}, an example shows how to use this data set to
     463create altitude distribution histogram for selected regions.
    457464\begin{verbatim}
    458465#  Open a PPF file containing topographic data for france
     
    866873\href{http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html}
    867874Data is usually read from FITS files as vectors, images, cubes or tables.
    868 A subset of SOPHYA objects can be exported in FITS format.
     875A subset of SOPHYA objects can be imported or exported in FITS format.
    869876\item[\bul] PPF (Portable Persistence file Format) is the native SOPHYA
    870877data format.
     
    968975
    969976The 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
     977of our galaxy. This file contains sky emission at 408 MHz,
     978as brightness temperature, represented as a SOPHYA spherical map
     979(SphereHEALPix$<$r\_4$>$) in \href{http://healpix.jpl.nasa.gov/}{\bf HEALPix}
     980format \footnote{HEALPix home page: \hspace{5mm} http://healpix.jpl.nasa.gov/}.
     981It has been made, by rebinning, from the Haslam 408 MHz
    971982all 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}
    974986\begin{verbatim}
    975987#  Open the fits file : the map is in HEALPix format
     
    983995\begin{center}
    984996\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.
     998The underlying SOPHYA object is a \tcls{SphereHEALPix} }
    986999\end{center}
    9871000\end{figure}
     
    9951008
    9961009Piapp graphic output can be exported in postscript (level 2) or
    997 encapsulated postscript format.
     1010encapsulated postscript format, preserving the full precision
     1011of vector graphics.
    9981012Postscript (.ps) files my contain several pages, each vue or window
    9991013corresponding to one page and are suitable for direct printing.
     
    10041018Postscript file can easily be converted to other formats,
    10051019PDF or image formats (jpeg \ldots) using converters like
    1006 {\bf ps2pdf} or {imagemagick}. 
     1020{\bf ps2pdf} or {\bf imagemagick}. 
    10071021
    10081022The menu items under \menubar{PostScript} can be used to export
     
    11431157\end{verbatim}
    11441158\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}.
     1160The 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)
    11501163# The file can be found in directory DemoData/
    11511164readfits syncmap.fits
     1165newwin 1 1 800 400
     1166disp syncmap 'lut=lin,2,50 midas_bluered'
     1167newwin 1 2
    11521168# Compute and display the pixel value histogram (brightness temperature)
    1153 n/plot syncmap.val val<200 ! ! 'font=helvetica,bold,16'
     1169n/plot syncmap.val val<200 ! ! 'font=helvetica,bold,16 notit'
    11541170settitle 'Sky brightness @ 408 MHz' ' ' 'font=helvetica,bold,16'
     1171# display the pixel value histogram in the galactic plane
     1172n/plot syncmap.val val<200&&(fabs(teta-M_PI/2)<0.025) ! ! 'red notit'
     1173settitle '408 MHz - Galactic plane' ' ' 'font=helvetica,bold,16 red'
    11551174\end{verbatim}
    11561175\vspace*{4mm}
     
    11671186zone 1 2
    11681187# Draw a longitude-latitude grid in Molleweide projection
    1169 mollgrid 5 7 'axesnone black font=helvetica,roman,12'
     1188mollgrid 5 7 'axesnone black font=helvetica,roman,12 notit'
    11701189# Overlay the sources distribution from UZC, for bright objects (mag<14)
    11711190plot2d uzc longlat2mollX(ra*15,dec) longlat2mollY(dec) mag<14 \
     
    11801199  'same nsta red marker=circle,5'
    11811200\end{verbatim}
     1201%%%%%%%%%%%%%%%%
     1202%%%%%%%%%%%%%%%%
     1203\item Analysis of elevation (altitude) data for france. We use the francetopo.ppf
     1204data set described page \pageref{francetopo}.
     1205\begin{verbatim}
     1206# open and display the topographic data for france
     1207openppf francetopo.ppf (in DemoData/ directory)
     1208print francetoto
     1209#--- TMatrix<s>(NRows=1332, NCols=1548) ND=2 SizeX*Y*...= 1548x1332 ---
     1210disp francetopo 'zoom/2 imagecenter=750,700 lut=lin,-700,800 colbr128'
     1211#  Compute the altitude distribution
     1212newh1d altf 0. 4000 100
     1213projh1d altf francetopo val val>0.1
     1214# Display the histogram overlayed on the topographic map
     1215disp 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)
     1217newh1d altmc 0. 2000 100
     1218# We select the region as a circle of radius 200, centered on x=c=970,y=r=920
     1219set regcut (sqrt((c-970)*(c-970)+(r-920)*(r-920))<200)
     1220projh1d altmc francetopo val (val>0.1)&&$regcut
     1221# Create a new window and display the two histograms
     1222newwin 1 2
     1223setaxesatt 'font=helvetica,bold,16 fixedfontsize'
     1224disp altf 'notit'
     1225settitle 'Elevation (altitude) distribution over France' ' ' \
     1226  'font=helvetica,bold,16'
     1227disp altmc 'notit'
     1228settitle 'Elevation (altitude) distribution over MassifCentral' ' ' \
     1229  'font=helvetica,bold,16'
     1230\end{verbatim}
    11821231\end{enumerate}
    11831232
    1184 \begin{figure}[p]
     1233\begin{figure}[hp]
    11851234\includegraphics[width=15cm]{exhis2dpl.eps}
    11861235\caption{
Note: See TracChangeset for help on using the changeset viewer.