Changelog

upcoming

Feature

  • cp.join function to join multiple CSDM objects with same dimensions into one CSDM object with multiple dependent variables.

  • Ability to update dimension attribute units using the .to(unit, update_attrs=True) function. The default is the current behavior with update_attrs=False

  • np.tile can tile csdm objects.

  • Replace np.fft function calls with faster sp.fft calls.

v0.6.0

Feature

  • Convert negative increment CSDM object to positive increment CSDM object.

  • Accepts both C and F contiguous numpy array to convert to CSDM object. #57

  • Add csdm.reshape(dim1, dim2) to CSDM object to reshape a CSDM object to the given list dimension object—dim1, dim2.

  • Numpy broadcasing mulipllication can now be applied to csdm objects.

  • Support for additional numpy methods np.pad and np.flip.

Bugfix

  • fft and ifft scale the first point by 2 when the dimension is non-periodic.

  • Bugfix in serializing csdm #54

  • You can multiply CSDM objects by a scalar to the right (csdm * scalar). The fix now allows the multiplication of CSDM objects by a scalar to the left (scalar * csdm). #62

  • Bugfix where csdm objects .csdfe files were immutable.

v0.5.0

What’s new

  • Add support for np.cumsum, np.cumprod, np.argmin, np.argmax functions to CSDM objects.

Bugfix

  • Bugfix involving plot of datasets with dependent-variable quantity type of vector_1 or pixel_1.

  • Bugfix when assigning DimensionList/DependentVariableList to the CSDM dimensions and dependent_variables attribute #45

  • Bugfix in CSDM object serializing when using Astropy.units v4.0 and higher. #44

  • Bugfix for incorrect class name. #39

Deprecated

  • add_x, add_y functions are removed.

v0.4.1

Patch update for the CSDM dimension’s quantity_name attribute value from units compatible with astropy>=4.3

v0.4

What’s new

  • The add_dimension and add_dependent_variable from CSDM class are deprecated.

Bugfix

  • Fixed error in calculating the nmr dimensionless frequency ratio (ppm) when dimension.complex_fft=False

v0.3.5

  • Fix the missing library error from pip installation.

v0.3.4

Changes

  • Image and Contour plots of csdm objects no longer draw colorbar. Colorbar can be requested separately using plt.colorbar().

v0.3.3

What’s new!

  • Add size method to the CSDM object.

  • Added alias for the csdm keywords that are short and easy for coding. The following is the list of aliases

    • dependent_variables -> y

    • dimensions -> x

    • add_dependent_variable -> add_x

    • add_dimension -> add_x

    • coordinates -> coords

Bug fixes

  • Fixed bug causing a false error when reading sparse datasets.

v0.3.2

Bug fixes

  • Bugfix in fft method when applied to multi-dimensional CSDM objects.

  • Added new tutorial examples.

v0.3.1

Bug fixes

  • Bugfix regarding the phase multiplier for the CSDM.fft() methods where an incorrect phase was multiplied to the signal vector.

v0.3.0

What’s new!

  • Support for matplotlib.pyplot functions from CSDM objects.
    • plot,

    • scatter,

    • imshow,

    • contour, and

    • contourf

    Now you can directly plot CSDM objects as an argument to the above matplotlib methods.

v0.2.2

Bug fixes

  • Fixed bug where the metadata from the csdm.application key was not serialized to the file when using csdm.save() method.

  • Fixed a bug where the transpose of a CSDM object failed to retain the quantity_type information after the transpose.

Other changes

  • Add a new diffusion tensor MRI dataset to the example gallery.

  • Added dict() as an alias to the to_dict() method for all objects.

  • Added an alias of the cp.plot() function to the CSDM object as the plot() method.

v0.2.1

What’s new!

  • Add reciprocal_coordinates() and reciprocal_increment() methods to the LinearDimension class.

  • Added fft() function to the CSDM class.

  • Added transpose() method to the CSDM class.

v0.2.0

What’s new!

  • Added following methods to the CSDM class:
    • __eq__() for all class

    • __add__() = Adds two csdm object.

    • __iadd__() = Adds two csdm objects in-place.

    • __sub__() = Subtrace two csdm objects.

    • __isub__() = Subtrace two csdm objects in-place.

    • __mul__() = Multiply the components of the csdm object by a scalar.

    • __imul__() = Multiply the components of the csdm object by a scalar in-place.

    • __truvdiv__() = Divide the components of the csdm object by a scalar.

    • __itruediv__() = Divide the components of the csdm object by a scalar in-place.

    • split() = Split the dependent-variables into individual csdm objects.

  • Support for Numpy dimension reduction functions
    • sum(): Sum along a given dimension.

    • prod(): Product along a given dimension.

  • Support for Numpy ufunc functions:
    • sin, cos, tan, arcsin, arccos, arctan, sinh, cosh, tanh, arcsinh, arccosh, arctanh, exp, exp2, log, log2, log10, expm1, log1p, negative, positive, square, absolute, fabs, rint, sign, conj, conjugate, sqrt, cbrt, reciprocal

  • Added apodization functions.
    • sin, cos, tan, arcsin, arccos, arctan, exp

Bug fixes

  • Fixed a bug in cp.plot() method.

v0.1.5

  • Added method to convert the frequency dimension to nmr dimensionless frequency ratio with syntax, dimension.to('ppm', 'nmr_frequency_ratio'), where dimension is a LinearDimension object.

  • The csdmpy.plot() method also displays the dimension index on the axis label.

v0.1.4

  • Added to_dict() method to the CSDM, Dimension, and DependentVariable objects.

v0.1.3

  • Fixed warning message when physical quantity name is not found in the astropy units package.

  • Added dumps and loads function to dump and load the data model as json serialized string, respectively without serializing it to a file.

v0.0.11 to v0.1.2

  • Add a required unsigned_interger_type for SparseSampling dimension.

  • Fixed minor bugs.

  • Added a tags attribute to the CSDmodel object.

  • Changed ‘sampling_interval’ key to ‘count’.

  • Changed ‘quantity’ key to ‘quantity_name’.

  • Changed ‘index_zero_value’ key to ‘coordinates_offset’.

  • Changed ‘fft_output_order’ key to ‘complex_fft’.

  • Renamed IndependentVariable class to Dimension.

  • Renamed LinearlySpacedDimension class to LinearDimension.

  • Renamed ArbitrarilySpacedDimension class to MonotonicDimension.

  • Added a reciprocal attribute to LinearDimension and MonotonicDimension classes.

  • Removed the reverse attribute from all Dimension classes.

  • Changed ‘sampling_interval’ keyword to ‘increment’.

  • Changed ‘reference_offset’ keyword to ‘index_zero_value’.

  • Changed ‘linear_spacing’ literal to ‘linear’.

  • Changed ‘arbitrarily_sampled’ literal to ‘monotonic’.

  • Changed the defining of the coordinates for the LinearDimension from

    (11)\[X^\text{ref} = m_k J_k - c_k {\bf 1}\]

    to

    (12)\[X^\text{ref} = m_k J_k + c_k {\bf 1},\]

    where \(c_k\) is the reference offset, \(m_k\) is the increment, and \(J_k\) is the set of integer indices along the dimension.

  • Added ‘description’ key to ‘Dimension’, ‘DependentVariable’ and ‘CSDM’ object.

  • Changed ‘CSDM’ keyword to ‘csdm’

  • Changed ‘FFT_output_order’ keyword to ‘fft_output_order’

  • Changed ‘components_URL’ keyword to ‘components_url’