Loading [MathJax]/extensions/TeX/AMSmath.js
LALPulsar 7.1.1.1-8a6b96f
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
TwoDMeshPlot.c
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Jolien Creighton, Teviet Creighton
3*
4* This program is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License as published by
6* the Free Software Foundation; either version 2 of the License, or
7* (at your option) any later version.
8*
9* This program is distributed in the hope that it will be useful,
10* but WITHOUT ANY WARRANTY; without even the implied warranty of
11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12* GNU General Public License for more details.
13*
14* You should have received a copy of the GNU General Public License
15* along with with program; see the file COPYING. If not, write to the
16* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17* MA 02110-1301 USA
18*/
19
20#include <math.h>
21#include <lal/LALStdlib.h>
22#include <lal/LALConstants.h>
23#include <lal/TwoDMesh.h>
24#include "TwoDMeshPlot.h"
25
26/* Local constants. */
27#define TWODMESHPLOTC_MAXOBJ 797 /* Maximum number of objects in a
28 PostScript macro */
29
30/* Local datatypes. */
31typedef struct tagMeshMacroParamStruc {
32 UINT4 nMacro; /* running count of macro number */
33 UINT4 nObj; /* running count number of objects */
34 UINT4 level; /* current recursion level */
35 TwoDMeshPlotStruc *plotParams; /* top-level plotting parameters */
37
38/* Local prototypes. */
39static void
41 FILE *stream,
42 TwoDMeshNode *mesh,
44
45static void
47
48
49
50/**
51 * \author Creighton, T. D.
52 * \ingroup TwoDMeshPlot_h
53 * \brief Plots a hierarchical mesh of templates on an 2-dimensional parameter space.
54 *
55 * ### Description ###
56 *
57 * This routine creates a PostScript plot of the parameter mesh list
58 * pointed to by \c mesh, using the plotting parameters given in
59 * <tt>*params</tt>. The PostScript output is printed to the writable
60 * output stream <tt>*stream</tt> using <tt>fprintf()</tt>.
61 *
62 * ### Algorithm ###
63 *
64 * The algorithm is set up so that it requires only one pass through the
65 * list. After defining PostScript macros to plot mesh points, mesh
66 * tiles, and mismatch ellipses, the routine then defines a macro to plot
67 * the boundary. Since some PostScript interpreters will fail if a macro
68 * contains too many objects, the boundary-plotting macro may be split
69 * into several macros.
70 *
71 * LALPlotTwoDMesh() then calls a static (but LAL-compliant)
72 * subroutine LALMakeMeshMacro() to create one or more macros to
73 * plot the mesh points, tiles, or ellipses, as required by
74 * <tt>*params</tt>. This subroutine takes a pointer to the head of a list
75 * of mesh points as input, and traverses down the list, calling itself
76 * recursively on any submeshes it encounters (if
77 * <tt>params->maxLevels</tt> permits).
78 *
79 * While plotting the boundary and other mesh objects,
80 * LALPlotTwoDMesh() and LALMakeMeshMacro() keep track of
81 * the bounding box surrounding all plotted objects. This is used either
82 * to set a bounding box for the overall plot, or to adjust the scale of
83 * the plot, depending on <tt>params->autoscale</tt>. If the resulting
84 * bounding box is larger than a single \f$ 8.5''\times11'' \f$ page,
85 * LALPlotTwoDMesh() will divide the plot area up into pages of
86 * this side, calling the plotting macros on each page.
87 *
88 * ### Uses ###
89 *
90 * \code
91 * LALMalloc() LALFree()
92 * \endcode
93 *
94 * ### Notes ###
95 *
96 */
97void
99 FILE *stream,
100 TwoDMeshNode *mesh,
102{
103 UINT4 i; /* an index */
104 UINT4 nObj = 0; /* counter of number of objects boundary macro */
105 UINT4 nMacro = 0; /* counter of number of boundary macros */
106 UINT4 nPage = 0; /* number of pages plotted */
107 REAL4 bBox[4]; /* bounding box in plot coordinates */
108 REAL4 xOff, yOff; /* horizontal and vertical offsets */
109 MeshMacroParamStruc macroParams; /* parameters for
110 LALMakeMeshMacro() */
111
112 INITSTATUS( stat );
114
115 /* Check that arguments and their fields exist. */
119 if ( params->nLevels ) {
120 ASSERT( params->plotPoints, stat, TWODMESHPLOTH_ENUL,
122 ASSERT( params->plotTiles, stat, TWODMESHPLOTH_ENUL,
124 ASSERT( params->plotEllipses, stat, TWODMESHPLOTH_ENUL,
128 }
129
130 /* Perform some setup. */
131 if ( params->autoscale ) {
132 memcpy( bBox, params->bBox, 4 * sizeof( REAL4 ) );
133 }
134 params->bBox[0] = params->bBox[1] = LAL_REAL4_MAX;
135 params->bBox[2] = params->bBox[3] = -LAL_REAL4_MAX;
136 params->cosTheta = cos( LAL_PI_180 * params->theta );
137 params->sinTheta = sin( LAL_PI_180 * params->theta );
138 params->clip = ( ( params->clipBox[2] > params->clipBox[0] ) &&
139 ( params->clipBox[3] > params->clipBox[1] ) );
140
141 /* Write the PostScript header. */
142 fprintf( stream,
143 "%%!PS-Adobe-1.0\n"
144 "%%%%Creator: LALPlotTwoDMesh()\n"
145 "%%%%Title: mesh.ps\n"
146 "%%%%BoundingBox: %i %i %i %i\n"
147 "%%%%EndComments\n\n",
151
152 /* Write PostScript macros for plotting mesh points. The macros are
153 called simply as "point[N]", where [N] is the recursive submesh
154 level. */
155 for ( i = 0; i < params->nLevels; i++ )
156 if ( params->plotPoints[i] > 0 )
157 fprintf( stream,
158 "/point%u { gsave currentpoint translate %f %f scale\n"
159 " auto auto scale %f rotate\n"
160 " newpath 0 0 %u 0 360 arc closepath fill grestore }"
161 " def\n",
162 i, 1.0 / params->xScale, 1.0 / params->yScale,
163 -params->theta, params->plotPoints[i] );
164 else if ( params->plotPoints[i] < 0 )
165 fprintf( stream,
166 "/point%u { gsave currentpoint translate %f %f scale\n"
167 " auto auto scale %f rotate\n"
168 " newpath 0 0 r%u 0 360 arc closepath stroke grestore }"
169 " def\n",
170 i, 1.0 / params->xScale, 1.0 / params->yScale,
171 -params->theta, i );
172
173 /* Write PostScript macro for plotting ellipses. The macro is
174 called as "[axis1] [axis2] [angle] ellipse", where [axis1] and
175 [axis2] are the two principal axis lengths, and [angle] is the
176 angle in degrees counterclockwise from the x-axis to the first
177 principal axis. */
178 fprintf( stream,
179 "/ellipse { gsave currentpoint translate rotate scale\n"
180 " newpath 0 0 1 0 360 arc closepath stroke grestore } def\n" );
181
182 /* Write PostScript macro for plotting tiles. The macro is called
183 as "[dx] [dy1] [dy2] tile", where [dx] is the half-width of the
184 tile, and [dy1], [dy2] are the heights of the corners of the tile
185 relative to the centre. */
186 fprintf( stream,
187 "/tile { gsave currentpoint translate 3 copy\n"
188 " dup 4 1 roll exch 4 1 roll moveto sub 0 exch rlineto\n"
189 " 2 copy add neg 4 3 roll -2 mul exch rlineto\n"
190 " sub neg 0 exch rlineto closepath stroke grestore } def\n" );
191
192 /* Write PostScript macro to clip the x-y area, if necessary. */
193 if ( params->clip )
194 fprintf( stream,
195 "/xyclip { %f %f moveto %f %f lineto %f %f lineto\n"
196 " %f %f lineto closepath clip } def\n",
197 params->clipBox[0], params->clipBox[1],
198 params->clipBox[0], params->clipBox[3],
199 params->clipBox[2], params->clipBox[3],
200 params->clipBox[2], params->clipBox[1] );
201
202 /* Write PostScript macros for plotting boundary, if necessary. */
203 if ( params->nBoundary >= 2 ) {
204 REAL4 x, x0, dx; /* x coordinate, initial value, and increment */
205 REAL4 *yBound; /* array of y-values of boundary points */
206 yBound = ( REAL4 * )LALMalloc( 2 * params->nBoundary * sizeof( REAL4 ) );
207 if ( yBound == NULL ) {
209 }
210
211 /* Fill array of boundary points. */
212 x0 = params->params->domain[0];
213 dx = ( params->params->domain[1] - x0 ) / ( params->nBoundary - 1 );
214 for ( i = 0; i < params->nBoundary - 1; i++ ) {
215 x = x0 + i * dx;
216 ( params->params->getRange )( stat->statusPtr, yBound + 2 * i, x,
217 params->params->rangeParams );
218 BEGINFAIL( stat )
219 LALFree( yBound );
220 ENDFAIL( stat );
221 }
222 x = params->params->domain[1];
223 ( params->params->getRange )( stat->statusPtr, yBound + 2 * i, x,
224 params->params->rangeParams );
225 BEGINFAIL( stat )
226 LALFree( yBound );
227 ENDFAIL( stat );
228
229 /* Write macro. */
230 fprintf( stream,
231 "/boundary%u {\n"
232 "%f %f moveto\n", nMacro, x0, yBound[1] );
233 nObj = 3;
234 for ( i = 1; i < params->nBoundary - 1; i++ ) {
235 x = x0 + i * dx;
236 fprintf( stream, "%f %f lineto\n", x, yBound[2 * i + 1] );
237 AdjustBBox( x, yBound[2 * i + 1], params );
238 nObj += 3;
239 if ( nObj > TWODMESHPLOTC_MAXOBJ ) {
240 fprintf( stream,
241 "stroke } def\n"
242 "/boundary%u {\n"
243 "%f %f moveto\n", ++nMacro, x, yBound[2 * i + 1] );
244 nObj = 3;
245 }
246 }
247 x = params->params->domain[1];
248 fprintf( stream, "%f %f lineto\n", x, yBound[2 * i + 1] );
249 fprintf( stream, "%f %f lineto\n", x, yBound[2 * i] );
250 AdjustBBox( x, yBound[2 * i + 1], params );
251 AdjustBBox( x, yBound[2 * i], params );
252 nObj += 6;
253 for ( i = params->nBoundary - 2; i < ( UINT4 )( -1 ); i-- ) {
254 x = x0 + i * dx;
255 fprintf( stream, "%f %f lineto\n", x, yBound[2 * i] );
256 AdjustBBox( x, yBound[2 * i], params );
257 nObj += 3;
258 if ( nObj > TWODMESHPLOTC_MAXOBJ ) {
259 fprintf( stream,
260 "stroke } def\n"
261 "/boundary%u {\n"
262 "%f %f moveto\n", ++nMacro, x, yBound[2 * i] );
263 nObj = 3;
264 }
265 }
266 fprintf( stream,
267 "%f %f lineto\n"
268 "stroke } def\n", x0, yBound[1] );
269 nMacro++;
270 LALFree( yBound );
271 }
272
273 /* Set up parameters for LALMakeMeshMacro(). */
274 macroParams.nMacro = 0;
275 macroParams.nObj = 0;
276 macroParams.level = 0;
277 macroParams.plotParams = params;
278
279 /* Write PostScript macro for plotting the mesh. The routine
280 MakeMeshMacro() traverses the linked list, adding a line to the
281 macro for each node, and calling itself recursively on any
282 submeshes. */
283 fprintf( stream, "\n/mesh%u {\n", macroParams.nMacro );
284 TRY( LALMakeMeshMacro( stat->statusPtr, stream, mesh,
285 &macroParams ), stat );
286 fprintf( stream, "} def\n" );
287
288 /* Increment macro counter only if the last macro list is not
289 empty. */
290 if ( macroParams.nObj > 0 ) {
291 macroParams.nMacro++;
292 }
293
294 /* Autoscale the axes, if necessary. */
295 if ( params->autoscale ) {
296 REAL4 xScaleFac = params->bBox[2] - params->bBox[0];
297 REAL4 yScaleFac = params->bBox[3] - params->bBox[1];
298 if ( ( xScaleFac == 0.0 ) && ( yScaleFac == 0.0 ) ) {
300 }
301 xScaleFac = ( bBox[2] - bBox[0] ) / xScaleFac;
302 yScaleFac = ( bBox[3] - bBox[1] ) / yScaleFac;
303 if ( yScaleFac < xScaleFac ) {
304 xScaleFac = yScaleFac;
305 }
306 params->xScale *= xScaleFac;
307 params->yScale *= xScaleFac;
308 for ( i = 0; i < 4; i++ ) {
309 params->bBox[i] *= xScaleFac;
310 }
311 fprintf( stream, "/auto %f def\n", 1.0 / xScaleFac );
312 } else {
313 fprintf( stream, "/auto 1 def\n" );
314 }
315
316 /* Set up coordinate system. */
317 if ( params->bBox[2] > params->bBox[0] ) {
318 bBox[0] = params->bBox[0];
319 bBox[2] = params->bBox[2];
320 } else {
321 bBox[0] = params->bBox[2];
322 bBox[2] = params->bBox[0];
323 }
324 if ( params->bBox[3] > params->bBox[1] ) {
325 bBox[3] = params->bBox[3];
326 bBox[1] = params->bBox[1];
327 } else {
328 bBox[3] = params->bBox[1];
329 bBox[1] = params->bBox[3];
330 }
331 nPage = 0;
332
333 /* Set the global graphics state. */
334 fprintf( stream, "\n0 setlinewidth 0 setgray\n" );
335
336 /* Define an overall clipping region for all pages. */
337 fprintf( stream, "%i %i moveto %i %i lineto %i %i lineto\n"
338 "%i %i lineto closepath clip newpath\n",
346
347 /* Plot macros on each page. */
348 for ( yOff = params->bBox[1] - TWODMESHPLOTH_YMARG;
349 yOff < params->bBox[3] - TWODMESHPLOTH_YMARG - 1;
350 yOff += TWODMESHPLOTH_YSIZE )
351 for ( xOff = params->bBox[0] - TWODMESHPLOTH_XMARG;
352 xOff < params->bBox[2] - TWODMESHPLOTH_XMARG - 1;
353 xOff += TWODMESHPLOTH_XSIZE ) {
354 fprintf( stream, "\n"
355 "%%%%Page: %u\n"
356 "gsave %f %f translate %f rotate %f %f scale",
357 ++nPage, -xOff, -yOff, params->theta, params->xScale,
358 params->yScale );
359 if ( params->clip ) {
360 fprintf( stream, " xyclip\n" );
361 } else {
362 fprintf( stream, "\n" );
363 }
364 for ( i = 0; i < nMacro; i++ ) {
365 fprintf( stream, "boundary%u\n", i );
366 }
367 for ( i = 0; i < macroParams.nMacro; i++ ) {
368 fprintf( stream, "mesh%u\n", i );
369 }
370 fprintf( stream, "showpage grestore\n" );
371 }
372
373 /* Finished plotting. Restore params->bBox to its original setting,
374 if necessary. */
375 fprintf( stream, "\n%%%%EOF\n" );
376 if ( params->autoscale ) {
377 memcpy( params->bBox, bBox, 4 * sizeof( REAL4 ) );
378 }
380 RETURN( stat );
381}
382
383
384static void
386 FILE *stream,
387 TwoDMeshNode *mesh,
389/* This routine writes lines to the macro to draw the mesh
390 points, tiles, and ellipses (as required), for the list
391 pointed to by mesh. It calls itself recursively on any
392 submeshes, if the current recursion level is less than the
393 maximum requested recursion level. Along the way it adjusts
394 the bounding box for the figure. */
395{
396 UINT4 rLevel; /* current recursion depth */
397 BOOLEAN plotPoints; /* whether to plot mesh points at this level */
398 BOOLEAN plotEllipses; /* whether to plot ellipses at this level */
399 BOOLEAN plotTiles; /* whether to plot tiles at this level */
400 BOOLEAN plotAny; /* whether to plot anything at this level */
401
402 /* Pointer to the metric function, its optional arguments, and the
403 mismatch value, for the current recursion level. */
404 void ( *getMetric )( LALStatus *, REAL4 [3], REAL4 [2], void * ) = NULL;
405 void *metricParams = NULL;
406 REAL4 mThresh = 0.0;
407
408 INITSTATUS( stat );
410
412 ASSERT( params->plotParams, stat, TWODMESHPLOTH_ENUL,
414
415 /* Do nothing if we're beyond the maximum recursion level. */
416 if ( ( rLevel = params->level ) >= params->plotParams->nLevels ) {
418 RETURN( stat );
419 }
420
421 /* Otherwise, determine what needs to be plotted at this level. */
422 plotPoints = ( params->plotParams->plotPoints[rLevel] != 0 );
423 plotTiles = params->plotParams->plotTiles[rLevel];
424 plotEllipses = params->plotParams->plotEllipses[rLevel];
425 plotAny = ( plotPoints || plotTiles || plotEllipses );
426 if ( plotEllipses ) {
427 getMetric = params->plotParams->params[rLevel].getMetric;
428 metricParams = params->plotParams->params[rLevel].metricParams;
429 mThresh = params->plotParams->params[rLevel].mThresh;
430 }
431
432 /* Move down the list, plotting what needs to be plotted. */
433 while ( mesh != NULL ) {
434
435 if ( plotAny ) {
436 fprintf( stream, "%f %f moveto", mesh->x, mesh->y );
437 if ( plotPoints ) {
438 fprintf( stream, " point%u", rLevel );
439 AdjustBBox( mesh->x, mesh->y, params->plotParams );
440 params->nObj += 1;
441 }
442 if ( plotTiles ) {
443 fprintf( stream, " %f %f %f tile", mesh->dx, mesh->dy[0],
444 mesh->dy[1] );
445 AdjustBBox( mesh->x - mesh->dx, mesh->y - mesh->dy[0],
446 params->plotParams );
447 AdjustBBox( mesh->x - mesh->dx, mesh->y - mesh->dy[1],
448 params->plotParams );
449 AdjustBBox( mesh->x + mesh->dx, mesh->y + mesh->dy[0],
450 params->plotParams );
451 AdjustBBox( mesh->x + mesh->dx, mesh->y + mesh->dy[1],
452 params->plotParams );
453 params->nObj += 4;
454 }
455 if ( plotEllipses ) {
456 REAL4 position[2]; /* location of current mesh point */
457 REAL4 metric[3]; /* value of the metric at position */
458 REAL4 axes[2]; /* lengths of principal axes of ellipse */
459 REAL4 theta; /* angle from x-axis to axis[0] */
460 REAL4 cost, sint; /* cosine and sine of theta */
461 REAL4 lambda; /* eigenvalue of metric */
462 REAL4 term1, term2; /* temporary variables */
463
464 /* Get metric and angle. */
465 position[0] = mesh->x;
466 position[1] = mesh->y;
467 TRY( ( getMetric )( stat->statusPtr, metric, position,
468 metricParams ), stat );
469 theta = 0.5 * atan2( -2.0 * metric[2], metric[1] - metric[0] );
470 cost = cos( theta );
471 sint = sin( theta );
472
473 /* Get first principal axis. */
474 term1 = fabs( metric[0] * cost + metric[2] * sint );
475 term2 = fabs( metric[2] * cost + metric[1] * sint );
476 if ( term1 > term2 ) {
477 term2 /= term1;
478 lambda = term1 * sqrt( 1.0 + term2 * term2 );
479 } else {
480 term1 /= term2;
481 lambda = term2 * sqrt( 1.0 + term1 * term1 );
482 }
483 if ( lambda <= 0.0 ) {
486 }
487 axes[0] = sqrt( mThresh / lambda );
488
489 /* Get second principal axis. */
490 term1 = fabs( metric[0] * sint - metric[2] * cost );
491 term2 = fabs( metric[2] * sint - metric[1] * cost );
492 if ( term1 > term2 ) {
493 term2 /= term1;
494 lambda = term1 * sqrt( 1.0 + term2 * term2 );
495 } else {
496 term1 /= term2;
497 lambda = term2 * sqrt( 1.0 + term1 * term1 );
498 }
499 if ( lambda <= 0.0 ) {
502 }
503 axes[1] = sqrt( mThresh / lambda );
504
505 /* Plot ellipse. */
506 fprintf( stream, " %f %f %f ellipse", axes[0], axes[1],
507 theta * ( REAL4 )( LAL_180_PI ) );
508 AdjustBBox( mesh->x + axes[0]*cost - axes[1]*sint,
509 mesh->y + axes[0]*sint + axes[1]*cost,
510 params->plotParams );
511 AdjustBBox( mesh->x - axes[0]*cost - axes[1]*sint,
512 mesh->y - axes[0]*sint + axes[1]*cost,
513 params->plotParams );
514 AdjustBBox( mesh->x - axes[0]*cost + axes[1]*sint,
515 mesh->y - axes[0]*sint - axes[1]*cost,
516 params->plotParams );
517 AdjustBBox( mesh->x + axes[0]*cost + axes[1]*sint,
518 mesh->y + axes[0]*sint - axes[1]*cost,
519 params->plotParams );
520 params->nObj += 4;
521 }
522 fprintf( stream, "\n" );
523
524 /* Start a new macro if necessary. */
525 if ( params->nObj > TWODMESHPLOTC_MAXOBJ ) {
526 fprintf( stream,
527 "} def\n"
528 "\n/mesh%u {\n", ++( params->nMacro ) );
529 params->nObj = 0;
530 }
531 }
532
533 /* Plot any submeshes, if necessary. */
534 if ( ( mesh->subMesh != NULL ) &&
535 ( rLevel < params->plotParams->nLevels - 1 ) ) {
536 params->level += 1;
537 TRY( LALMakeMeshMacro( stat->statusPtr, stream, mesh->subMesh,
538 params ), stat );
539 params->level -= 1;
540 }
541
542 /* Move on to next node. */
543 mesh = mesh->next;
544 }
545 /* End of loop over list. */
547 RETURN( stat );
548}
549
550
551static void
553/* This routine expands the params->bBox field to include the
554 point with x-y coordinates given by position. */
555{
556 if ( !params->clip ||
557 ( ( x > params->clipBox[0] ) && ( x < params->clipBox[2] ) &&
558 ( y > params->clipBox[1] ) && ( y < params->clipBox[3] ) ) ) {
559 REAL4 xp = x * params->xScale * params->cosTheta -
560 y * params->yScale * params->sinTheta;
561 REAL4 yp = x * params->xScale * params->sinTheta +
562 y * params->yScale * params->cosTheta;
563 if ( params->bBox[0] > xp ) {
564 params->bBox[0] = xp;
565 }
566 if ( params->bBox[2] < xp ) {
567 params->bBox[2] = xp;
568 }
569 if ( params->bBox[1] > yp ) {
570 params->bBox[1] = yp;
571 }
572 if ( params->bBox[3] < yp ) {
573 params->bBox[3] = yp;
574 }
575 }
576 return;
577}
void getMetric(LALStatus *, meshREAL g[3], meshREAL skypos[2], void *params)
Definition: DopplerScan.c:414
#define LALMalloc(n)
#define LALFree(p)
#define ABORT(statusptr, code, mesg)
#define ENDFAIL(statusptr)
#define TRY(func, statusptr)
#define ATTATCHSTATUSPTR(statusptr)
#define ASSERT(assertion, statusptr, code, mesg)
#define DETATCHSTATUSPTR(statusptr)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
#define BEGINFAIL(statusptr)
#define fprintf
static void AdjustBBox(REAL4 x, REAL4 y, TwoDMeshPlotStruc *params)
Definition: TwoDMeshPlot.c:551
static void LALMakeMeshMacro(LALStatus *stat, FILE *stream, TwoDMeshNode *mesh, MeshMacroParamStruc *params)
Definition: TwoDMeshPlot.c:384
#define TWODMESHPLOTC_MAXOBJ
Definition: TwoDMeshPlot.c:27
double theta
#define LAL_180_PI
#define LAL_REAL4_MAX
#define LAL_PI_180
unsigned char BOOLEAN
uint32_t UINT4
float REAL4
#define TWODMESHPLOTH_ENOPLOT
Definition: TwoDMeshPlot.h:62
#define TWODMESHPLOTH_EMEM
Definition: TwoDMeshPlot.h:60
#define TWODMESHPLOTH_MSGEMETRIC
Definition: TwoDMeshPlot.h:67
#define TWODMESHPLOTH_MSGEMEM
Definition: TwoDMeshPlot.h:66
#define TWODMESHPLOTH_EMETRIC
Definition: TwoDMeshPlot.h:61
#define TWODMESHPLOTH_YMARG
Distance from bottom of page to plotting area (points)
Definition: TwoDMeshPlot.h:79
#define TWODMESHPLOTH_ENUL
Definition: TwoDMeshPlot.h:58
#define TWODMESHPLOTH_MSGENUL
Definition: TwoDMeshPlot.h:64
#define TWODMESHPLOTH_MSGENOPLOT
Definition: TwoDMeshPlot.h:68
#define TWODMESHPLOTH_XSIZE
Horizontal size of plotting area (points = )
Definition: TwoDMeshPlot.h:76
#define TWODMESHPLOTH_XMARG
Distance from left of page to plotting area (points)
Definition: TwoDMeshPlot.h:78
#define TWODMESHPLOTH_YSIZE
Vertical size of plotting area (points)
Definition: TwoDMeshPlot.h:77
void LALPlotTwoDMesh(LALStatus *stat, FILE *stream, TwoDMeshNode *mesh, TwoDMeshPlotStruc *params)
Plots a hierarchical mesh of templates on an 2-dimensional parameter space.
Definition: TwoDMeshPlot.c:97
list y
level
axes
TwoDMeshPlotStruc * plotParams
Definition: TwoDMeshPlot.c:34
This structure represents a single node in a linked list of mesh points, specified in the coordinate ...
Definition: TwoDMesh.h:124
struct tagTwoDMeshNode * next
The next mesh point in the linked list; NULL if this is the tail.
Definition: TwoDMesh.h:128
REAL4 dx
The half-width of the tile centred on the mesh point.
Definition: TwoDMesh.h:126
struct tagTwoDMeshNode * subMesh
The head of a linked list of fine mesh points within the rectangular area spanned by this mesh point ...
Definition: TwoDMesh.h:129
REAL4 dy[2]
The heights of the two right-hand corners of the tile, relative to the mesh point.
Definition: TwoDMesh.h:127
REAL4 y
The coordinates of the mesh point.
Definition: TwoDMesh.h:125
This structure stores parameters specifying how to plot a PostScript diagram of the parameter mesh.
Definition: TwoDMeshPlot.h:85
LALDict * params