Changeset 4920
- Timestamp:
- Aug 30, 2005, 4:07:12 PM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 16 edited
-
astro/psTime.h (modified) (2 diffs)
-
imageops/psImageConvolve.c (modified) (4 diffs)
-
imageops/psImageConvolve.h (modified) (2 diffs)
-
imageops/psImageGeomManip.c (modified) (3 diffs)
-
imageops/psImageGeomManip.h (modified) (4 diffs)
-
imageops/psImagePixelManip.c (modified) (6 diffs)
-
imageops/psImagePixelManip.h (modified) (6 diffs)
-
mathtypes/psImage.c (modified) (2 diffs)
-
mathtypes/psImage.h (modified) (2 diffs)
-
mathtypes/psScalar.c (modified) (2 diffs)
-
mathtypes/psScalar.h (modified) (2 diffs)
-
sys/psMemory.c (modified) (5 diffs)
-
sys/psMemory.h (modified) (2 diffs)
-
sys/psType.h (modified) (2 diffs)
-
types/psHash.h (modified) (2 diffs)
-
types/psMetadata.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psTime.h
r4898 r4920 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.3 5$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-08-3 0 01:14:10$13 * @version $Revision: 1.36 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-08-31 02:07:09 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 60 60 * seconds and microseconds. 61 61 */ 62 typedef struct psTime62 typedef struct 63 63 { 64 64 psS64 sec; ///< Seconds since epoch, Jan 1, 1970. -
trunk/psLib/src/imageops/psImageConvolve.c
r4898 r4920 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-08-3 0 01:14:13$7 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-08-31 02:07:11 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 488 488 489 489 void psImageSmooth (psImage *image, 490 floatsigma,491 floatNsigma)490 double sigma, 491 double Nsigma) 492 492 { 493 493 494 494 int Nx, Ny, Npixel, Nrange; 495 floatfactor, g, s;495 double factor, g, s; 496 496 psVector *temp; 497 497 … … 505 505 506 506 // generate gaussian 507 psVector *gaussnorm = psVectorAlloc (Npixel, PS_TYPE_F 32);507 psVector *gaussnorm = psVectorAlloc (Npixel, PS_TYPE_F64); 508 508 for (int i = -Nrange; i < Nrange + 1; i++) { 509 gaussnorm->data.F 32[i+Nrange] = exp (factor*i*i);510 } 511 psF 32 *gauss = &gaussnorm->data.F32[Nrange];509 gaussnorm->data.F64[i+Nrange] = exp (factor*i*i); 510 } 511 psF64 *gauss = &gaussnorm->data.F64[Nrange]; 512 512 513 513 // smooth in X direction 514 temp = psVectorAlloc (Nx, PS_TYPE_F 32);514 temp = psVectorAlloc (Nx, PS_TYPE_F64); 515 515 for (int j = 0; j < Ny; j++) { 516 psF 32 *vi = image->data.F32[j];517 psF 32 *vo = temp->data.F32;516 psF64 *vi = image->data.F64[j]; 517 psF64 *vo = temp->data.F64; 518 518 for (int i = 0; i < Nx; i++) { 519 519 g = s = 0; … … 528 528 vo[i] = s / g; 529 529 } 530 memcpy (image->data.F 32[j], temp->data.F32, Nx*sizeof(psF32));530 memcpy (image->data.F64[j], temp->data.F64, Nx*sizeof(psF64)); 531 531 } 532 532 psFree (temp); 533 533 534 534 // smooth in Y direction 535 temp = psVectorAlloc (image->numRows, PS_TYPE_F 32);535 temp = psVectorAlloc (image->numRows, PS_TYPE_F64); 536 536 for (int i = 0; i < Nx; i++) { 537 psF 32 *vo = temp->data.F32;538 psF 32 **vi = image->data.F32;537 psF64 *vo = temp->data.F64; 538 psF64 **vi = image->data.F64; 539 539 for (int j = 0; j < Ny; j++) { 540 540 g = s = 0; -
trunk/psLib/src/imageops/psImageConvolve.h
r4898 r4920 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-08-3 0 01:14:13$9 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-08-31 02:07:11 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 144 144 void psImageSmooth( 145 145 psImage *image, ///< the image to be smoothed 146 float sigma,///< the width of the smoothing kernel in pixels147 float Nsigma///< the size of the smoothing box in sigmas146 double sigma, ///< the width of the smoothing kernel in pixels 147 double Nsigma ///< the size of the smoothing box in sigmas 148 148 ); 149 149 -
trunk/psLib/src/imageops/psImageGeomManip.c
r4608 r4920 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 7-25 20:49:04$12 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-08-31 02:07:11 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 305 305 const psImage* input, 306 306 float angle, 307 complex exposed,307 complex double exposed, 308 308 psImageInterpolateMode mode) 309 309 { … … 597 597 float dx, 598 598 float dy, 599 complex exposed,599 complex double exposed, 600 600 psImageInterpolateMode mode) 601 601 { -
trunk/psLib/src/imageops/psImageGeomManip.h
r4608 r4920 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-0 7-25 20:49:04$10 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-08-31 02:07:11 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 77 77 const psImage* input, ///< input image 78 78 float angle, ///< the rotation angle in radians. 79 complex exposed,///< the output image pixel values for non-imagery areas79 complex double exposed, ///< the output image pixel values for non-imagery areas 80 80 psImageInterpolateMode mode ///< the interpolation mode used 81 81 ); … … 97 97 float dx, ///< the shift in x direction. 98 98 float dy, ///< the shift in y direction. 99 complex exposed,///< the output image pixel values for non-imagery areas99 complex double exposed, ///< the output image pixel values for non-imagery areas 100 100 psImageInterpolateMode mode ///< the interpolation mode to use 101 101 ); … … 151 151 psRegion region, ///< the size of the transformed image 152 152 const psPixels* pixels, /**< if not NULL, consists of psPixelCoords and specifies which pixels in 153 * output image shall be transformed; otherwise, entire image generated*/153 * output image shall be transformed; otherwise, entire image generated*/ 154 154 psImageInterpolateMode mode, ///< the interpolation scheme to be used 155 155 double exposedValue ///< Exposed value to which non-corresponding pixels are set -
trunk/psLib/src/imageops/psImagePixelManip.c
r4815 r4920 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-08- 18 21:44:40$12 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-08-31 02:07:11 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 311 311 312 312 int psImageClipComplexRegion(psImage* input, 313 complex min,314 complex vmin,315 complex max,316 complex vmax)313 complex double min, 314 complex double vmin, 315 complex double max, 316 complex double vmax) 317 317 { 318 318 psS32 numClipped = 0; … … 401 401 psRegion *region, 402 402 bool logical_and, 403 intmaskValue)403 psMaskType maskValue) 404 404 { 405 405 … … 428 428 psRegion *region, 429 429 bool logical_and, 430 intmaskValue)430 psMaskType maskValue) 431 431 { 432 432 … … 459 459 double radius, 460 460 bool logical_and, 461 intmaskValue)461 psMaskType maskValue) 462 462 { 463 463 … … 489 489 double radius, 490 490 bool logical_and, 491 intmaskValue)491 psMaskType maskValue) 492 492 { 493 493 -
trunk/psLib/src/imageops/psImagePixelManip.h
r4815 r4920 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-08- 18 21:44:40$10 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-08-31 02:07:11 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 51 51 int psImageClipComplexRegion( 52 52 psImage* input, ///< the image to clip 53 complex min, ///< the minimum image value allowed54 complex vmin, ///< the value pixels < min are set to55 complex max, ///< the maximum image value allowed56 complex vmax ///< the value pixels > max are set to53 complex double min, ///< the minimum image value allowed 54 complex double vmin, ///< the value pixels < min are set to 55 complex double max, ///< the maximum image value allowed 56 complex double vmax ///< the value pixels > max are set to 57 57 ); 58 58 … … 96 96 psRegion *region, ///< the specified region 97 97 bool logical_and, ///< the logical operation 98 int maskValue///< the specified bits98 psMaskType maskValue ///< the specified bits 99 99 ); 100 100 … … 108 108 psRegion *region, ///< the specified region 109 109 bool logical_and, ///< the logical operation 110 int maskValue///< the specified bits110 psMaskType maskValue ///< the specified bits 111 111 ); 112 112 … … 122 122 double radius, ///< the radius of the specified circle 123 123 bool logical_and, ///< the logical operation 124 int maskValue///< the specified bits124 psMaskType maskValue ///< the specified bits 125 125 ); 126 126 … … 136 136 double radius, ///< the radius of the specified circle 137 137 bool logical_and, ///< the logical operation 138 int maskValue///< the specified bits138 psMaskType maskValue ///< the specified bits 139 139 ); 140 140 -
trunk/psLib/src/mathtypes/psImage.c
r4898 r4920 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.7 8$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-08-3 0 01:14:13$11 * @version $Revision: 1.79 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-08-31 02:07:11 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 199 199 200 200 // define a square region centered on the given coordinate 201 psRegion psRegionForSquare( floatx,202 floaty,203 floatradius)201 psRegion psRegionForSquare(double x, 202 double y, 203 double radius) 204 204 { 205 205 psRegion region; -
trunk/psLib/src/mathtypes/psImage.h
r4898 r4920 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.6 4$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-08-3 0 01:14:13$13 * @version $Revision: 1.65 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-08-31 02:07:11 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 179 179 */ 180 180 psRegion psRegionForSquare( 181 floatx, ///< x coordinate at square-center182 floaty, ///< y coordinate at square-center183 floatradius ///< radius of square181 double x, ///< x coordinate at square-center 182 double y, ///< y coordinate at square-center 183 double radius ///< radius of square 184 184 ); 185 185 -
trunk/psLib/src/mathtypes/psScalar.c
r4898 r4920 8 8 * @author Ross Harman, MHPCC 9 9 * 10 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-08-3 0 01:14:13$10 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-08-31 02:07:11 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 27 27 } 28 28 29 psScalar* psScalarAlloc(complex value, psElemType type)29 psScalar* psScalarAlloc(complex double value, psElemType type) 30 30 { 31 31 psScalar* scalar = NULL; -
trunk/psLib/src/mathtypes/psScalar.h
r4898 r4920 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-08-3 0 01:14:13$13 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-08-31 02:07:11 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 66 66 */ 67 67 psScalar* psScalarAlloc( 68 complex value, ///< Data to be put into psScalar.68 complex double value, ///< Data to be put into psScalar. 69 69 psElemType type ///< Type of data to be held by psScalar. 70 70 ); -
trunk/psLib/src/sys/psMemory.c
r4898 r4920 8 8 * @author Robert Lupton, Princeton University 9 9 * 10 * @version $Revision: 1.6 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-08-3 0 01:14:13$10 * @version $Revision: 1.63 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-08-31 02:07:11 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 480 480 */ 481 481 int psMemCheckLeaks(psMemId id0, 482 psMemBlock * ** arr,482 psMemBlock ***array, 483 483 FILE * fd, 484 psBool persistence)484 bool persistence) 485 485 { 486 486 psS32 nleak = 0; … … 509 509 pthread_mutex_unlock(&memBlockListMutex); 510 510 511 if (nleak == 0 || arr == NULL) {511 if (nleak == 0 || array == NULL) { 512 512 return nleak; 513 513 } 514 514 515 *arr = p_psAlloc(nleak * sizeof(psMemBlock), __FILE__, __LINE__);515 *array = p_psAlloc(nleak * sizeof(psMemBlock), __FILE__, __LINE__); 516 516 pthread_mutex_lock(&memBlockListMutex); 517 517 … … 521 521 (iter->id >= id0)) { 522 522 523 (*arr )[j++] = iter;523 (*array)[j++] = iter; 524 524 if (j == nleak) { // found them all 525 525 break; … … 897 897 break; 898 898 } 899 899 900 900 *//* case PS_DATA_REGION: 901 901 if ( psMemCheckRegion(ptr) ) -
trunk/psLib/src/sys/psMemory.h
r4898 r4920 12 12 * @ingroup MemoryManagement 13 13 * 14 * @version $Revision: 1. 49$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-08-3 0 01:14:13$14 * @version $Revision: 1.50 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-08-31 02:07:11 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 277 277 int psMemCheckLeaks( 278 278 psMemId id0, ///< don't list blocks with id < id0 279 psMemBlock * ** arr,///< pointer to array of pointers to leaked blocks, or NULL279 psMemBlock ***array, ///< pointer to array of pointers to leaked blocks, or NULL 280 280 FILE * fd, ///< print list of leaks to fd (or NULL) 281 psBool persistence///< make check across all object even persistent ones281 bool persistence ///< make check across all object even persistent ones 282 282 ); 283 283 -
trunk/psLib/src/sys/psType.h
r4600 r4920 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.3 8$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 7-22 23:47:13$12 * @version $Revision: 1.39 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-08-31 02:07:11 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 287 287 psElemType type; ///< The type 288 288 psDimen dimen; ///< The dimensionality. 289 // psElemType type; ///< The type290 289 } 291 290 psMathType; -
trunk/psLib/src/types/psHash.h
r4898 r4920 11 11 * @author GLG, MHPCC 12 12 * 13 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-08-3 0 01:14:13$13 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-08-31 02:07:12 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 38 38 39 39 /** The hash-table itself. */ 40 typedef struct psHash40 typedef struct 41 41 { 42 42 long n; ///< Number of buckets in hash table. -
trunk/psLib/src/types/psMetadata.h
r4898 r4920 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.6 0$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-08-3 0 01:14:13$13 * @version $Revision: 1.61 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-08-31 02:07:12 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 90 90 * allows fast lookup when given a metadata keyword. 91 91 */ 92 typedef struct psMetadata92 typedef struct 93 93 { 94 94 psList* list; ///< Metadata in linked-list … … 114 114 * information about the item name, flags, comments, and other items with the same name. 115 115 */ 116 typedef struct psMetadataItem116 typedef struct 117 117 { 118 118 const psS32 id; ///< Unique ID for metadata item. … … 333 333 int format, ///< psMetadataFlag options/flags 334 334 const char* comment, ///< Comment for metadata item 335 psBool value ///< Value for metadata item data335 bool value ///< Value for metadata item data 336 336 ); 337 337
Note:
See TracChangeset
for help on using the changeset viewer.
