goatpy.preprocessing
====================

.. py:module:: goatpy.preprocessing


Functions
---------

.. autoapisummary::

   goatpy.preprocessing.normalize_matrix
   goatpy.preprocessing.normalize_spatialdata


Module Contents
---------------

.. py:function:: normalize_matrix(X, method='TIC', eps=1e-12)

   Normalize a (n_pixels × n_mz) matrix.


.. py:function:: normalize_spatialdata(sdata: spatialdata.SpatialData, table_name: str, method: str = 'TIC', inplace: bool = False)

   Normalize intensities per pixel in a SpatialData object.

   :param sdata:
   :type sdata: SpatialData
   :param table_name: Name of the table containing intensities (pixels × mz)
   :type table_name: str
   :param method:
   :type method: 'TIC' | 'RMS'
   :param inplace: If False, returns a new SpatialData object
   :type inplace: bool


