@nirs4all/methods 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -57,7 +57,7 @@ restores the original typed label table; omitting it exposes native class IDs.
57
57
  import * as n4m from "@nirs4all/methods";
58
58
 
59
59
  await n4m.loadModule();
60
- console.log(n4m.version()); // "1.4.0+abi.2.24.0"
60
+ console.log(n4m.version()); // "1.4.1+abi.2.24.0"
61
61
  console.log(n4m.abiVersion()); // [2, 24, 0]
62
62
 
63
63
  const rows = 40, cols = 6;
@@ -1816,6 +1816,32 @@ export declare class SpectralNoiseProxy extends NativeProcedure implements Proce
1816
1816
  constructor(params?: SpectralNoiseProxyParams);
1817
1817
  run(X: Matrix, y?: Matrix | Float64Array | ArrayLike<number>, inputs?: FitInputs): Record<string, ProcedureOutput>;
1818
1818
  }
1819
+ /** Parameters of SpectralPopulationEventsQc; unset values take the native defaults. */
1820
+ export interface SpectralPopulationEventsQcParams {
1821
+ /** Default []. */
1822
+ valid_mask?: number[];
1823
+ /** Default "index". */
1824
+ axis_basis?: "index" | "physical";
1825
+ /** Default []. */
1826
+ axis_values?: number[];
1827
+ /** Default 8. */
1828
+ outlier_threshold?: number;
1829
+ /** Default 5. */
1830
+ min_spectra?: number;
1831
+ }
1832
+ /** Native `diagnostics.spectral_population_events_qc` (generic). */
1833
+ export declare class SpectralPopulationEventsQc extends NativeProcedure implements Procedure {
1834
+ readonly methodId = "diagnostics.spectral_population_events_qc";
1835
+ readonly paramTypes: {
1836
+ readonly valid_mask: "int_array";
1837
+ readonly axis_basis: "enum";
1838
+ readonly axis_values: "double_array";
1839
+ readonly outlier_threshold: "double";
1840
+ readonly min_spectra: "int";
1841
+ };
1842
+ constructor(params?: SpectralPopulationEventsQcParams);
1843
+ run(X: Matrix, y?: Matrix | Float64Array | ArrayLike<number>, inputs?: FitInputs): Record<string, ProcedureOutput>;
1844
+ }
1819
1845
  /** Parameters of SpectralReferenceQc; unset values take the native defaults. */
1820
1846
  export interface SpectralReferenceQcParams {
1821
1847
  /** Default []. */
@@ -1286,6 +1286,25 @@ export class SpectralNoiseProxy extends NativeProcedure {
1286
1286
  }
1287
1287
  }
1288
1288
  NativeMethod.register("diagnostics.spectral_noise_proxy", SpectralNoiseProxy);
1289
+ /** Native `diagnostics.spectral_population_events_qc` (generic). */
1290
+ export class SpectralPopulationEventsQc extends NativeProcedure {
1291
+ methodId = "diagnostics.spectral_population_events_qc";
1292
+ paramTypes = {
1293
+ valid_mask: "int_array",
1294
+ axis_basis: "enum",
1295
+ axis_values: "double_array",
1296
+ outlier_threshold: "double",
1297
+ min_spectra: "int",
1298
+ };
1299
+ constructor(params = {}) {
1300
+ super();
1301
+ this.params = { ...params };
1302
+ }
1303
+ run(X, y, inputs = {}) {
1304
+ return this.runOutputs(X, y, inputs);
1305
+ }
1306
+ }
1307
+ NativeMethod.register("diagnostics.spectral_population_events_qc", SpectralPopulationEventsQc);
1289
1308
  /** Native `diagnostics.spectral_reference_qc` (generic). */
1290
1309
  export class SpectralReferenceQc extends NativeProcedure {
1291
1310
  methodId = "diagnostics.spectral_reference_qc";
package/dist/n4m.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nirs4all/methods",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "WebAssembly build of libn4m (nirs4all-methods) — portable PLS/NIRS engine and native method bindings.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "build": "npm run clean && tsc -p .",
22
22
  "stage:wasm": "node -e \"const fs=require('fs'),p='../../build/'+(process.env.N4M_WASM_PRESET||'emscripten')+'/bindings/js/';fs.mkdirSync('dist',{recursive:true});for(const f of ['n4m.js','n4m.wasm']){if(!fs.existsSync(p+f))throw new Error('missing WASM artifact '+p+f+' — run: cmake --preset emscripten && cmake --build --preset emscripten --target n4m_wasm');fs.copyFileSync(p+f,'dist/'+f)}fs.copyFileSync('../../THIRD_PARTY_LICENSES.md','dist/THIRD_PARTY_LICENSES.md');fs.cpSync('../../LICENSES','dist/LICENSES',{recursive:true});console.log('staged n4m.js + n4m.wasm + THIRD_PARTY_LICENSES.md into dist/')\"",
23
23
  "prepack": "npm run build && npm run stage:wasm",
24
- "test": "node --experimental-vm-modules test/run_smoke.mjs && node --experimental-vm-modules test/run_api.mjs && node --experimental-vm-modules test/run_generic_method.mjs && node --experimental-vm-modules test/run_pop_aom.mjs && node --experimental-vm-modules test/run_new_pack.mjs && node --experimental-vm-modules test/run_serialization_inspect.mjs && node --experimental-vm-modules test/run_method_result_model.mjs && node --experimental-vm-modules test/run_native_preprocessing_pipeline.mjs && node --experimental-vm-modules test/run_native_splitter.mjs && node --experimental-vm-modules test/run_native_augmentation.mjs && node --experimental-vm-modules test/run_estimator_roles.mjs && node --experimental-vm-modules test/run_estimator_roles_negative.mjs && node --experimental-vm-modules test/run_role_pipeline.mjs && node --experimental-vm-modules test/run_spectral_encoding.mjs && node --experimental-vm-modules test/run_optimization.mjs && node --experimental-vm-modules test/run_preflight_diagnostics.mjs && node --experimental-vm-modules test/run_pls_scale_equivariance.mjs && node --experimental-vm-modules test/run_pls_small_covariance.mjs && node --experimental-vm-modules test/run_pls_null_consumers.mjs && node --experimental-vm-modules test/run_pls_scale_consumers.mjs && node test/run_intrinsic_diagnostics.mjs && npm run test:shared-scoring && node test/run_snv_parameter_contract.mjs && node test/run_raw_i32_status.mjs && node --experimental-vm-modules test/ranking_mock.mjs && node test/run_ranking.mjs && node test/run_component_analysis.mjs && node test/run_multimodal_teaching.mjs && node test/run_explain.mjs && node test/run_importance.mjs",
24
+ "test": "node --experimental-vm-modules test/run_smoke.mjs && node --experimental-vm-modules test/run_api.mjs && node --experimental-vm-modules test/run_generic_method.mjs && node --experimental-vm-modules test/run_pop_aom.mjs && node --experimental-vm-modules test/run_new_pack.mjs && node --experimental-vm-modules test/run_serialization_inspect.mjs && node --experimental-vm-modules test/run_method_result_model.mjs && node --experimental-vm-modules test/run_native_preprocessing_pipeline.mjs && node --experimental-vm-modules test/run_native_splitter.mjs && node --experimental-vm-modules test/run_native_augmentation.mjs && node --experimental-vm-modules test/run_estimator_roles.mjs && node --experimental-vm-modules test/run_estimator_roles_negative.mjs && node --experimental-vm-modules test/run_role_pipeline.mjs && node --experimental-vm-modules test/run_spectral_encoding.mjs && node --experimental-vm-modules test/run_optimization.mjs && node --experimental-vm-modules test/run_preflight_diagnostics.mjs && node test/run_preflight_pca_weak_scores.mjs && node --experimental-vm-modules test/run_pls_scale_equivariance.mjs && node --experimental-vm-modules test/run_pls_small_covariance.mjs && node --experimental-vm-modules test/run_pls_null_consumers.mjs && node --experimental-vm-modules test/run_pls_scale_consumers.mjs && node test/run_intrinsic_diagnostics.mjs && npm run test:shared-scoring && node test/run_snv_parameter_contract.mjs && node test/run_raw_i32_status.mjs && node --experimental-vm-modules test/ranking_mock.mjs && node test/run_ranking.mjs && node test/run_component_analysis.mjs && node test/run_multimodal_teaching.mjs && node test/run_explain.mjs && node test/run_importance.mjs && node test/run_aom_fit_result.mjs",
25
25
  "test:shared-scoring": "node test/run_shared_scoring.mjs"
26
26
  },
27
27
  "license": "CECILL-2.1 OR AGPL-3.0-or-later",