[Getdata-commits] SF.net SVN: getdata:[827] trunk/getdata
Scientific Database Format
Brought to you by:
ketiltrout
|
From: <ket...@us...> - 2013-04-06 02:17:13
|
Revision: 827
http://sourceforge.net/p/getdata/code/827
Author: ketiltrout
Date: 2013-04-06 02:17:09 +0000 (Sat, 06 Apr 2013)
Log Message:
-----------
Re-implement CountMax/SetCoutMax in C++ for backwards compatiblity. Fix perl mandir. Doc updates.
Modified Paths:
--------------
trunk/getdata/ChangeLog
trunk/getdata/NEWS
trunk/getdata/bindings/cxx/getdata/entry.h
trunk/getdata/bindings/cxx/getdata/mplexentry.h
trunk/getdata/configure.ac
trunk/getdata/doc/README.cxx
trunk/getdata/doc/README.f77
trunk/getdata/doc/README.f95
trunk/getdata/doc/README.idl
trunk/getdata/doc/README.matlab
trunk/getdata/m4/perl.m4
trunk/getdata/man/dirfile-format.5
Added Paths:
-----------
trunk/getdata/doc/README.perl
Removed Paths:
-------------
trunk/getdata/doc/README.perl.in
Property Changed:
----------------
trunk/getdata/doc/
Modified: trunk/getdata/ChangeLog
===================================================================
--- trunk/getdata/ChangeLog 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/ChangeLog 2013-04-06 02:17:09 UTC (rev 827)
@@ -1,3 +1,9 @@
+2013-04-06 D. V. Wiebe <ge...@ke...> svn:827
+ * bindings/cxx/getdata/entry.h (Entry::CountMax)
+ bindings/cxx/getdata/mplexentry.h (MplexEntry::CountMax
+ MplexEntry::SetCountMax): Added (but marked deprecated) for backwards
+ compatibility.
+
2013-04-05 D. V. Wiebe <ge...@ke...> svn:826
* bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90
bindings/perl/t/big_test.t: Fix test 231.
Modified: trunk/getdata/NEWS
===================================================================
--- trunk/getdata/NEWS 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/NEWS 2013-04-06 02:17:09 UTC (rev 827)
@@ -1,56 +1,89 @@
New in version 0.8.4a:
+ Dirfile Changes:
+
+ * CLARIFICATION: Inconsistant behaviour in the library, coupled with
+ contradictory statements in the Dirfile Standards, has resulted in confusion
+ over the meaning of the final, optional, parameter in a MPLEX definition.
+ To be clear: this parameter is simply the expected period between successive
+ occurances of the "count" value in the index vector. (It is used by GetData
+ only to figure out a resonable length for the MPLEX lookback.) The
+ following clarifications and corrections have been made to the definition
+ of the MPLEX field type in dirfile-format(5):
+
+ - The final, optional parameter has been renamed from "max" to "period".
+
+ - This parameter indicates not the maximal range of the index vector, as
+ previously stated, but the expected number of samples between successive
+ occurances of the specified "count" value in the index vector; as before,
+ it should be regarded as a hint, and does not place any actual restriction
+ on the contents of the index vector.
+
+ - The incorrect requirement that the "count" parameter be non-negative has
+ been deleted.
+
+ - The incorrect requirement that "count" be less than or equal to "max", if
+ "max" is present and non-zero, has been deleted.
+
+ - The meaning of an omitted or zero "period", indicating that the spacing of
+ "count" in the index vector is unknown or non-uniform, is now explicitly
+ stated.
+
+ - Different MPLEX fields using the same index vector may specify different
+ periods.
+
+ See also the related library bug fixes below.
+
Library Changes:
- * BUG FIX: Inconsistant behaviour in the library, coupled with contradictory
- statements in the Dirfile Standards, has resulted in confusion over the
- meaning of the final, optional, parameter in a MPLEX definition. To be clear:
- this parameter is simply the expected period between successive occurances of
- the mplex value in the index vector. It is used by GetData only to figure out
- a resonable length of the MPLEX lookback. To help reduce confusion, this
- parameter has been renamed from "count_max" to "period". The Standards have
- also been clarified. See also the following related bug fixes.
+ * The count_max member of the gd_entry_t object has been renamed period. The
+ corresponding dummy argument in various function prototypes has been
+ similarly renamed.
- * BUG FIX: The count_val MPLEX parameter is not restricted to non-negative
- numbers.
+ * BUG FIX: The library no longer incorrectly rejects negative count_val MPLEX
+ parameters. Furthermore, a count_val of -1 in gd_alter_entry or
+ gd_[m]alter_mplex calls is not a special value: it just sets count_val to
+ -1.
- * BUG FIX: The optional period (formerly count_max) MPLEX parameter does not
- restrict allowed values of the count_val parameter.
+ * BUG FIX: The library no longer incorrectly rejects MPLEX fields where
+ count_val is greater than the period (formerly called count_max).
* BUG FIX: The default MPLEX period, if none is specified, is 2*count_val + 1,
- not simply 2 * count_val, when count_val is greater than 5.
+ not simply 2 * count_val, when count_val is greater than 5.
- * BUG FIX: A count_val of -1 in gd_alter_entry or gd_[m]alter_mplex calls is
- not a special value: it just sets the count_val to -1.
-
* BUG FIX: Trying to position an I/O pointer to before sample zero with
- gd_seek() now properly fails. Previously it would allow it, causing bizarre
- things to happen later.
+ gd_seek() now properly fails. Previously it would allow it, causing bizarre
+ things to happen later.
* BUG FIX: Using gd_tell to get the I/O pointer position of a derived field
- with exactly two input fields (MULTIPLY, DIVIDE, MPLEX, WINDOW) now properly
- reports an error in the "multiposition" case (ie. when the two inputs are
- ultimately reading from different locations in the same RAW field).
+ with exactly two input fields (MULTIPLY, DIVIDE, MPLEX, WINDOW) now properly
+ reports an error in the "multiposition" case (ie. when the two inputs are
+ ultimately reading from different locations in the same RAW field).
* BUG FIX: Trying to read sample zero of a gzipped RAW field the second time
- now works as expected. Previously, the request to reposition the I/O pointer
- back to zero would be ignored by the gzip framework. Reported by Alexandra
- Rahlin.
+ now works as expected. Previously, the request to reposition the I/O
+ pointer back to zero would be ignored by the gzip framework. Reported by
+ Alexandra Rahlin.
* BUG FIX: The field code of a reference field declared in a subfragment
- included with affixes is no longer corrupted by spurious application of the
- affixes when the subfragment's metadata are (re-)written. Reported by Seth.
+ included with affixes is no longer corrupted by spurious application of the
+ affixes when the subfragment's metadata are (re-)written. Reported by Seth.
Bindings Changes:
- * IDL BUG FIX: Entry structs representing MPLEX fields are now properly
- interpreted. Previously, the underlying gd_entry_t object was being
- incorrectly initialised.
+ * C++: The Entry and MplexEntry member functions CountMax and SetCountMax have
+ been renamed to Period and SetPeriod for consistency with the changes listed
+ above. CountMax and SetCountMax are still avaialbe as aliases, but are
+ marked deprecated.
+ * IDL BUG FIX: GD_ENTRY structures representing MPLEX fields are now properly
+ interpreted. Previously, the underlying gd_entry_t object was being
+ incorrectly initialised.
+
* PYTHON BUG FIX: Numpy arrays returned by dirfile.getdata() are now the
- correct length. Previously they would always be the length requested (or the
- length of the dirfile, if no length was explicitly given) even if fewer
- samples were returned. Extra elements would contain uninitialised memory.
+ correct length. Previously they would always be the length requested (or
+ the length of the dirfile, if no length was explicitly given) even if fewer
+ samples were returned. Extra elements would contain uninitialised memory.
|==============================================================================|
@@ -59,27 +92,28 @@
Library Changes:
* BUG FIX: Several bugs on big-ended systems have been fixed. Reported by
- Dinar Valeev.
+ Dinar Valeev.
* BUG FIX: Adding an entry via gd_[m]add() with a negative CARRAY scalar index
- no longer results in an internal error or worse when the added field is later
- read.
+ no longer results in an internal error or worse when the added field is
+ later read.
* BUG FIX: Changing a CONST field to a real floating point type using
- gd_alter_const() (or similar) no longer results in the value of the field
- being corrupted.
+ gd_alter_const() (or similar) no longer results in the value of the field
+ being corrupted.
* BUG FIX: A bug in the parser's tokeniser has been fixed to prevent spurious
- "unterminated token" syntax errors. Typically this would only be seen when
- using gd_strtok() to tokenise an (apparently innocuous) user-supplied string,
- but a carefully crafted format file could also be made to get gd_open() to
- produce it.
+ "unterminated token" syntax errors. Typically this would only be seen when
+ using gd_strtok() to tokenise an (apparently innocuous) user-supplied
+ string, but a carefully crafted format file could also be made to get
+ gd_open() to produce it.
Bindings Changes:
* Bindings for MATLAB have been added.
+
* The IDL, Perl, and Python bindings no longer require a C99 compiler to be
- built.
+ built.
|==============================================================================|
Modified: trunk/getdata/bindings/cxx/getdata/entry.h
===================================================================
--- trunk/getdata/bindings/cxx/getdata/entry.h 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/bindings/cxx/getdata/entry.h 2013-04-06 02:17:09 UTC (rev 827)
@@ -228,6 +228,9 @@
return (E.field_type == GD_MPLEX_ENTRY) ? E.u.mplex.period : 0;
}
+ /* deprecated member alias */
+ virtual int gd_deprecated CountMax() const { return Period(); }
+
/* Set methods */
void SetName(const char* name);
Modified: trunk/getdata/bindings/cxx/getdata/mplexentry.h
===================================================================
--- trunk/getdata/bindings/cxx/getdata/mplexentry.h 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/bindings/cxx/getdata/mplexentry.h 2013-04-06 02:17:09 UTC (rev 827)
@@ -56,6 +56,15 @@
virtual int SetPeriod(int period);
virtual int SetPeriod(const char* period);
+ /* deprecated member aliases */
+ virtual int gd_deprecated CountMax() const { return Period(); };
+ virtual int gd_deprecated SetCountMax(int period) {
+ return SetPeriod(period);
+ }
+ virtual int gd_deprecated SetCountMax(const char* period) {
+ return SetPeriod(period);
+ };
+
private:
MplexEntry(const GetData::Dirfile *dirfile, const char* field_code) :
Entry(dirfile, field_code) { };
Modified: trunk/getdata/configure.ac
===================================================================
--- trunk/getdata/configure.ac 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/configure.ac 2013-04-06 02:17:09 UTC (rev 827)
@@ -1036,9 +1036,6 @@
AC_CONFIG_FILES([bindings/python/Makefile])
AC_CONFIG_FILES([bindings/python/test/Makefile])
AC_CONFIG_FILES([doc/Makefile])
-if test "x$make_perlbindings" != "xno"; then
-AC_CONFIG_FILES([doc/README.perl])
-fi
AC_CONFIG_FILES([man/Makefile])
AC_CONFIG_FILES([man/gd_alter_encoding.3])
AC_CONFIG_FILES([man/gd_alter_endianness.3])
Index: trunk/getdata/doc
===================================================================
--- trunk/getdata/doc 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/doc 2013-04-06 02:17:09 UTC (rev 827)
Property changes on: trunk/getdata/doc
___________________________________________________________________
Modified: svn:ignore
## -1,3 +1,2 ##
Makefile.in
Makefile
-README.perl
Modified: trunk/getdata/doc/README.cxx
===================================================================
--- trunk/getdata/doc/README.cxx 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/doc/README.cxx 2013-04-06 02:17:09 UTC (rev 827)
@@ -400,7 +400,7 @@
* virtual WindOpType Entry::WindOp()
* virtual gd_triplet_t Entry::Threshold()
* virtual int Entry::CountVal()
-* virtual int Entry::CountMax()
+* virtual int Entry::Period()
These methods will return the corresponding member of the gd_entry_t object.
Only methods reasonable to be queried for the given field type will return
@@ -767,7 +767,7 @@
* virtual const char *MplexEntry::Scalar()
* virtual int MplexEntry::ScalarIndex()
* virtual int MplexEntry::CountVal()
-* virtual int MplexEntry::CountMax()
+* virtual int MplexEntry::Period()
These methods, re-implemented from the Entry class, return the corresponding
field parameter.
@@ -776,8 +776,8 @@
* int MplexEntry::SetWindOp(WindOpType coeff)
* int MplexEntry::SetCountVal(int count_val)
* int MplexEntry::SetCountVal(const char *count_val)
-* int MplexEntry::SetCountMax(int count_max)
-* int MplexEntry::SetCountMax(const char *count_max)
+* int MplexEntry::SetPeriod(int period)
+* int MplexEntry::SetPeriod(const char *period)
These functions will change the specified input field, check field, or the
count value or max to the value or field code supplied.
Modified: trunk/getdata/doc/README.f77
===================================================================
--- trunk/getdata/doc/README.f77 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/doc/README.f77 2013-04-06 02:17:09 UTC (rev 827)
@@ -1132,11 +1132,11 @@
specified is not of POLYNOM type, infield_len will be set to zero. In this
case the value of the remaining data is unspecified.
-* GDGEMX(infield, infield_len, countfield, countfield_len, countval, countmax,
+* GDGEMX(infield, infield_len, countfield, countfield_len, countval, period,
fragment_index, dirfile_unit, field_code, field_code_len)
Output:
- INTEGER countval, countmax, fragment_index
+ INTEGER countval, period, fragment_index
CHARACTER*<infield_len> infield
CHARACTER*<countfield_len> countfield
Input/Output:
@@ -1460,11 +1460,11 @@
should be of type integer, otherwise it should be double precision.
* GDALMX(dirfile_unit, field_code, field_code_len, infield, infield_len,
- countfield, countfield_len, countval, countmax)
+ countfield, countfield_len, countval, period)
Input:
INTEGER dirfile_unit, field_code_len, infield_len, countfile_len, countval
- INTEGER countmax
+ INTEGER period
CHARACTER*<field_code_len> field_code
CHARACTER*<infield_len> infield
CHARACTER*<countfield_len> countfield
@@ -1837,11 +1837,11 @@
should be of type double precision.
* GDADMX(dirfile_unit, field_code, field_code_len, infield, infield_len,
- countfield, countfield_len, countval, countmax, fragment_index)
+ countfield, countfield_len, countval, period, fragment_index)
Input:
INTEGER dirfile_unit, field_code_len, infield_len, countfile_len, countval
- INTEGER countmax, fragment_index
+ INTEGER period, fragment_index
CHARACTER*<field_code_len> field_code
CHARACTER*<infield_len> infield
CHARACTER*<countfield_len> countfield
@@ -1939,7 +1939,7 @@
* GDMDWD(dirfile_unit, parent, field_code, field_code_len, in_field,
in_field_len, check_field, check_field_len, windop, threshold)
* GDMDMX(dirfile_unit, parent, field_code, field_code_len, in_field,
- in_field_len, count_field, count_field_len, count_val, count_max)
+ in_field_len, count_field, count_field_len, count_val, period)
* GDMDCA(dirfile_unit, parent, parent_len, field_code, field_code_len,
const_type, array_len, data_type, data)
* GDMDCO(dirfile_unit, parent, parent_len, field_code, field_code_len,
Modified: trunk/getdata/doc/README.f95
===================================================================
--- trunk/getdata/doc/README.f95 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/doc/README.f95 2013-04-06 02:17:09 UTC (rev 827)
@@ -231,9 +231,9 @@
character (len=*), intent(in) :: field_name, in_field, table
* subroutine fgd_add_mplex (dirfile, field_code, in_field, count_field,
- count_val, count_max, fragment_index)
+ count_val, period, fragment_index)
character(len=*), intent(in) :: field_code, in_field, count_field
- integer, intent(in) :: dirfile, count_val, count_max, fragment_index
+ integer, intent(in) :: dirfile, count_val, period, fragment_index
* subroutine fgd_add_multiply (dirfile, field_name, in_field1, in_field2,
fragment_index)
@@ -353,9 +353,9 @@
character (len=*), intent(in) :: field_name, in_field, table, parent
* subroutine fgd_madd_mplex (dirfile, parent, field_code, in_field, count_field,
- count_val, count_max)
+ count_val, period)
character(len=*), intent(in) :: parent, field_code, in_field, count_field
- integer, intent(in) :: dirfile, count_val, count_max
+ integer, intent(in) :: dirfile, count_val, period
* subroutine fgd_madd_phase (dirfile, parent, field_name, in_field, phase)
integer, intent(in) :: dirfile, phase
@@ -512,8 +512,8 @@
character (len=*), intent(in) :: field_name, in_field, table
* subroutine fgd_alter_mplex (dirfile, field_name, in_field, count_field,
- count_val, count_max)
- integer, intent(in) :: dirfile, count_val, count_max
+ count_val, period)
+ integer, intent(in) :: dirfile, count_val, period
character (len=*), intent(in) :: field_name, in_field, count_field
* subroutine fgd_alter_multiply (dirfile, field_name, in_field1, in_field2)
@@ -872,7 +872,7 @@
type gd_entry
integer :: field_type, n_fields, spf, data_type, bitnum, numbits, shift
integer :: fragment_index, comp_scal, poly_ord, array_len, windop
- integer :: ithreshold, count_val, count_max
+ integer :: ithreshold, count_val, period
character (len=GD_FIELD_LEN), dimension(3) :: field
character (len=GD_FIELD_LEN), dimension(6) :: scalar
integer, dimension(6) :: scalar_ind
Modified: trunk/getdata/doc/README.idl
===================================================================
--- trunk/getdata/doc/README.idl 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/doc/README.idl 2013-04-06 02:17:09 UTC (rev 827)
@@ -117,7 +117,6 @@
CB DCOMPLEX Array[3]
BITNUM INT
COMP_SCAL INT
- COUNT_MAX INT
COUNT_VAL INT
DATA_TYPE INT
DIVIDEND DOUBLE
@@ -126,6 +125,7 @@
CM DCOMPLEX Array[3]
N_FIELDS INT
NUMBITS INT
+ PERIOD INT
POLY_ORD INT
SCALAR STRING Array[6]
SCALAR_IND INT Array[6]
@@ -445,7 +445,7 @@
field metadata. See gd_alter_linterp(3).
PROCEDURE GD_ALTER_MPLEX, dirfile_unit, field_code, COUNT_FIELD=count_field,
- COUNT_MAX=count_max, COUNT_VAL=count_val, IN_FIELD=in_field
+ PERIOD=period, COUNT_VAL=count_val, IN_FIELD=in_field
This procedure modifies the metadata of the MPLEX field specified by
'field_code', updating only those field parameters specified as keyword
Modified: trunk/getdata/doc/README.matlab
===================================================================
--- trunk/getdata/doc/README.matlab 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/doc/README.matlab 2013-04-06 02:17:09 UTC (rev 827)
@@ -8,10 +8,10 @@
The compatibility library is installed in ${libdir}. By default, the MATLAB
files are installed in ${libdir}/getdata/matlab/getdata, although this path
can be changed with the --with-matlab-dir option to ./configure. To use the
-bindings, the install directory must be added to the MATLAB path.
+bindings, the installation directory must be added to the MATLAB path.
Full documentation of the bindings are provided from within the MATLAB help
-system. After installing the bindings are installed, running
+system. After installing the bindings, running
>> help getdata
Copied: trunk/getdata/doc/README.perl (from rev 826, trunk/getdata/doc/README.perl.in)
===================================================================
--- trunk/getdata/doc/README.perl (rev 0)
+++ trunk/getdata/doc/README.perl 2013-04-06 02:17:09 UTC (rev 827)
@@ -0,0 +1,16 @@
+PERL BINDINGS FOR GETDATA
+=========================
+
+The Perl bindings consist of a perl module, `GetData.pm'. They should work with
+Perl 5.6 or newer. Complex data are represented within the module as
+Math::Complex objects.
+
+The GetData Perl bindings are documented in POD markup within GetData.pm.
+After installation, this documentation should be available in section 3 of
+the UNIX manual:
+
+ $ man 3 GetData
+
+Before installation, the manual can be read using a command along the lines of
+
+ $ pod2man bindings/perl/GetData.pm.in | nroff -mandoc | less
Deleted: trunk/getdata/doc/README.perl.in
===================================================================
--- trunk/getdata/doc/README.perl.in 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/doc/README.perl.in 2013-04-06 02:17:09 UTC (rev 827)
@@ -1,16 +0,0 @@
-PERL BINDINGS FOR GETDATA
-=========================
-
-The Perl bindings consist of a perl module, `GetData.pm'. They should work with
-Perl 5.6 or newer. Complex data are represented within the module as
-Math::Complex objects.
-
-The GetData Perl bindings are documented in POD markup within GetData.pm.
-After installation, this documentation should be available in section @PERL_MAN3EXT@ of
-the UNIX manual:
-
- $ man @PERL_MAN3EXT@ GetData
-
-Before installation, the manual can be read using a command along the lines of
-
- $ pod2man bindings/perl/GetData.pm.in | nroff -mandoc | less
Modified: trunk/getdata/m4/perl.m4
===================================================================
--- trunk/getdata/m4/perl.m4 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/m4/perl.m4 2013-04-06 02:17:09 UTC (rev 827)
@@ -177,7 +177,7 @@
GD_PERL_CONFIG([perlmandir], [siteman3direxp])
elif test $perl_inst_type != "vendor"; then
perldir="${local_perl_path}"
- perlmandir="${mandir}"
+ perlmandir="${man3dir}"
fi
if test $perlmandir = "UNKNOWN"; then
Modified: trunk/getdata/man/dirfile-format.5
===================================================================
--- trunk/getdata/man/dirfile-format.5 2013-04-05 01:27:53 UTC (rev 826)
+++ trunk/getdata/man/dirfile-format.5 2013-04-06 02:17:09 UTC (rev 827)
@@ -857,12 +857,8 @@
.I period
place no restrictions on values contained in
.IR index .
-Specifically, samples of
+Specifically, particular values of
.I index
-may exceed
-.IR period .
-Particular values of
-.I index
(including
.IR count )
need not be equally spaced (neither by
@@ -871,8 +867,11 @@
.I index
need not ever take on the value
.I count
-(in which case the value of the entirety of the output vector is
-implementation dependent). MPLEX appeared in Standards Version 9.
+(in which case the value of the entirety of the derived field is
+implementation dependent). Different MPLEX field definitions which use the
+same index vector may specify different
+.IR period s.
+MPLEX appeared in Standards Version 9.
.RE
.TP
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|