Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c262e2b
use spline in YCalibrationComponent
vedina Oct 30, 2025
62e2c17
now the hungarian assignment algorithm for matching peaks ensurec mon…
vedina Nov 4, 2025
3bc7ab8
monotonic option for matchng peaks in the XCalibrationComponent
vedina Nov 4, 2025
59650e3
revert to simpler match if the cost matrix is unfeasible
vedina Nov 4, 2025
f1b5d7a
cluster matching is best anyway
vedina Nov 4, 2025
155cad3
final options
vedina Nov 5, 2025
141b503
fixed Incompatible default for argument "tolerance"
vedina Nov 5, 2025
32ea126
fixes Incompatible types in assignment (array - list)
vedina Nov 5, 2025
4da7dd5
more mypy cleanup
vedina Nov 5, 2025
c5ddc01
mypy happiness
vedina Nov 5, 2025
01a253a
sorry, numpy typing
vedina Nov 5, 2025
37383c1
ok, mypy, your turn
vedina Nov 5, 2025
d17e6d6
new matching by dynamic programming with bells and whistles
vedina Nov 27, 2025
60c9d31
handle unit conversions in a single place
vedina Nov 28, 2025
694ba6c
quantile matching initial implementation
vedina Jan 12, 2026
08c2e20
CWA Ne raman lines
vedina Jan 12, 2026
e455c82
quantile and argmin2d match
vedina Jan 12, 2026
6262445
optional quantile_map
vedina Jan 13, 2026
f7392b6
qmatch without normalization
vedina Jan 13, 2026
602023d
NIST peaks
vedina Jan 13, 2026
087433d
quantile map and dense inverse pchip spline
vedina Jan 13, 2026
60f08f1
clean prints
vedina Jan 14, 2026
7a5b390
refactor interpolators
vedina Jan 14, 2026
25ee22e
refactoring match_peaks function
vedina Jan 14, 2026
320f094
refactoring fit_peaks into non-class function
vedina Jan 14, 2026
073b97a
compatible dataframe
vedina Jan 14, 2026
c36c769
inline mask for other matching algorithms
vedina Jan 15, 2026
f144fe9
matchpeaks4analysis
vedina Jan 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions src/ramanchada2/misc/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from .. import spectrum as rc2spectrum
from .utils.ramanshift_to_wavelength import (abs_nm_to_shift_cm_1_dict,
shift_cm_1_to_abs_nm,
shift_cm_1_to_abs_nm_dict)
shift_cm_1_to_abs_nm_dict,
_create_dict_for_laser)

PST_RS_dict = {620.9: 16, 795.8: 10, 1001.4: 100, 1031.8: 27, 1155.3: 13, 1450.5: 8,
1583.1: 12, 1602.3: 28, 2852.4: 9, 2904.5: 13, 3054.3: 32}
Expand Down Expand Up @@ -744,9 +745,27 @@
calcite_cwa = [155.21, 281.26, 711.95, 1085.91, 1435.22, 1748.91]
calcite_cwa_dict = dict(zip(calcite_cwa, [1]*len(calcite_cwa)))


ne_peaks_cwa = [
[533.07775,540.05616,556.27662,565.66588,571.92248,574.82985,576.44188,580.44496,582.01558,585.24878,587.28275,588.1895,590.24623,594.4834,596.5471,598.79074,602.99968,607.43376,609.6163,612.84498,614.30627,616.35937,618.2146,621.72812,626.64952,630.47893,633.44276,638.29914,640.2248,650.65277,653.28824,659.89528,667.82766,671.7043,692.94672,702.405,703.24128,705.91079,717.3938,724.51665,748.88712,753.57739,754.40439,794.31805,808.24576,811.85495,813.64061,830.03248,836.57464,837.7607,846.33569,849.53591,854.46952,857.13535,859.12583,863.46472,870.41122,877.16575,878.37539,885.38669,891.95007,898.85564,914.8672,920.17588,927.55191,930.08532,932.65072,937.33079,942.53797,945.9211,948.66825,953.4164,954.74052,966.542],
[0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00005,0.00004,0.00005,0.00004,0.00005,0.00004,0.00004,0.00005,0.00005,0.00005,0.00004,0.00005,0.00005,0.00004,0.00005,0.00005,0.00005,0.00005,0.00005,0.0001,0.00005,0.00005,0.00005,0.00005,0.00005,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.0001,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.0001,0.0001,0.00004,0.00004,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.00005],
[60,200,50,50,50,50,70,50,50,200,50,100,5,50,50,15,100,100,30,10,100,100,15,100,100,10,100,100,200,150,10,100,50,7,1000,300,800,20,800,800,300,300,130,80,60,40,170,300,50,800,40,700,15,30,400,350,30,100,400,300,60,20,120,90,9,80,70,15,50,30,50,60,30,180]
]

ne_peaks_nist = [
[533.07775,534.10938,534.32834,540.05618,556.27662,565.66588,571.92248,574.82985,576.44188,580.44496,582.01558,585.24879,587.28275,588.18952,590.24623,590.64294,594.48342,596.5471,597.46273,597.5534,598.79074,602.99969,607.43377,609.61631,612.84499,614.30626,616.35939,618.2146,621.72812,626.6495,630.47889,632.81646,633.44278,638.29917,640.2248,650.65281,653.28822,659.89529,665.20927,667.82762,671.7043,692.94673,702.40504,703.24131,705.12923,705.91074,717.39381,724.51666,747.24386,748.88712,753.57741,754.40443,772.46233,783.90529,792.71177,793.69961,794.31814,808.2458,811.85492,812.89108,813.64054,825.9379,826.60772,826.71162,830.03258,836.57466,837.7608,841.71606,841.84274,846.33575,848.44435,849.53598,854.46958,857.13524,859.12584,863.4647,864.70411,865.43831,865.5522,867.94925,868.19211,870.41116,877.16563,878.06226,878.37533,883.09072,885.38668,886.53063,886.57552,891.95006,898.85564,914.86716,920.17591,922.00601,922.15801,922.66903,927.55196,930.08527,931.05839,931.39726,932.65068,937.33078,942.53788,945.92095,948.66818,953.41629,954.74049,966.54197]
]

# Create dicts for each laser
neon_wl_514_nist_dict = _create_dict_for_laser(514, raman_range=(-500, 4000), peaks=ne_peaks_cwa[0])
neon_wl_532_nist_dict = _create_dict_for_laser(532, raman_range=(-500, 4000), peaks=ne_peaks_cwa[0])
neon_wl_633_nist_dict = _create_dict_for_laser(633, raman_range=(-500, 3500), peaks=ne_peaks_cwa[0])
neon_wl_785_nist_dict = _create_dict_for_laser(785, raman_range=(-500, 3500), peaks=ne_peaks_cwa[0])

# Your existing NEON_WL constant
NEON_WL: Final = {
785: neon_wl_785_nist_dict,
633: neon_wl_633_nist_dict,
532: neon_wl_532_nist_dict,
514: neon_wl_532_nist_dict,
}
514: neon_wl_514_nist_dict,
}
4 changes: 3 additions & 1 deletion src/ramanchada2/misc/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
abs_nm_to_shift_cm_1_dict,
shift_cm_1_to_abs_nm_dict,
laser_wl_nm,
filter_ref_lines_for_raman
)

from .svd import (svd_inverse,
Expand All @@ -18,6 +19,7 @@
)

from .matchsets import (
match_peaks,
match_peaks_optimized, match_peaks_monotonic,
match_peaks_monotonic_simple,
match_peaks_cluster
)
Loading
Loading