Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed May 30, 2024
1 parent 98abb95 commit da97c68
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
A lot of the files and folders are in a early development state or may require some serious refactoring.
For now, I give a summary of the modules which are somewhat stable already:

| Module | Description |
|--------------------------------------|----------------------------------------------------------------------------|
| `ionplotter.spectrum` | Collection of spectra processing functionality. |
| `ionplotter.spectrum.baseline` | Estimate spectrum baseline curve. |
| `ionplotter.spectrum.peak_picking` | |
| `ionplotter.spectrum.peak_filtering` | |
| `ionplotter.calibration` | Calibration specific functionality. |
| `ionplotter.image` | Image specific functionality. |
| `ionplotter.parallel_ops` | Basic building blocks for parallelization of operations across *ReadFiles. |
| `ionplotter.persistence` | Persistence specific code, including reader and writer for Imzml files. |
| `ionplotter.peak_filtering` | Peak filtering specific code. |
| `ionplotter.peak_picking` | Peak picking specific code. |
| `ionplotter.visualize` | Visualization specific code. |
| Module | Description |
|-------------------------------------|----------------------------------------------------------------------------|
| `depiction.spectrum` | Collection of spectra processing functionality. |
| `depiction.spectrum.baseline` | Estimate spectrum baseline curve. |
| `depiction.spectrum.peak_picking` | |
| `depiction.spectrum.peak_filtering` | |
| `depiction.calibration` | Calibration specific functionality. |
| `depiction.image` | Image specific functionality. |
| `depiction.parallel_ops` | Basic building blocks for parallelization of operations across *ReadFiles. |
| `depiction.persistence` | Persistence specific code, including reader and writer for Imzml files. |
| `depiction.peak_filtering` | Peak filtering specific code. |
| `depiction.peak_picking` | Peak picking specific code. |
| `depiction.visualize` | Visualization specific code. |

## Setup dev environment

Expand Down
7 changes: 4 additions & 3 deletions examples/spectra_calibration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from pathlib import Path
import spectrum_utils.spectrum
import spectrum_utils.plot

from matplotlib import pyplot as plt
from numpy.typing import NDArray
from xarray import DataArray
Expand Down Expand Up @@ -53,7 +52,8 @@ def main() -> None:
print("Applying models...")
spectra_calib = []
for (mz_arr, int_arr), features in zip(spectra_picked, all_features):
mz_arr, int_arr = calib.apply_spectrum_model(spectrum_mz_arr=mz_arr, spectrum_int_arr=int_arr, model_coef=features)
mz_arr, int_arr = calib.apply_spectrum_model(spectrum_mz_arr=mz_arr, spectrum_int_arr=int_arr,
model_coef=features)
spectra_calib.append((mz_arr, int_arr))

# compare the spectra somehow...
Expand All @@ -77,6 +77,7 @@ def main() -> None:
ax.set_ylim(0, 1)
plt.show()


def create_data():
original_file = "/Users/leo/code/msi/code/msi_targeted_preproc/example/data-work/menzha_20231208_s607930_64074-b20-30928-a/baseline_adj.imzML"
imzml_file = ImzmlReadFile(original_file)
Expand Down

0 comments on commit da97c68

Please sign in to comment.