Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/lactame.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ on:
types: [published]

env:
NODE_VERSION: 16.x
NODE_VERSION: 22.x

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get package name
run: echo "PACKAGE_NAME=$(jq .name package.json | tr -d '"')" >> $GITHUB_ENV
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/typedoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
types: [published]

env:
NODE_VERSION: 16.x
NODE_VERSION: 22.x
ENTRY_FILE: 'src/index.ts'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
Expand Down
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# ml-spectra-fitting

[![NPM version][npm-image]][npm-url]
[![build status][ci-image]][ci-url]
[![npm download][download-image]][download-url]
[![NPM version](https://img.shields.io/npm/v/ml-spectra-fitting.svg)](https://www.npmjs.com/package/ml-spectra-fitting)
[![npm download](https://img.shields.io/npm/dm/ml-spectra-fitting.svg)](https://www.npmjs.com/package/ml-spectra-fitting)
[![test coverage](https://img.shields.io/codecov/c/github/mljs/spectra-fitting.svg)](https://codecov.io/gh/mljs/spectra-fitting)
[![license](https://img.shields.io/npm/l/ml-spectra-fitting.svg)](https://github.com/mljs/spectra-fitting/blob/main/LICENSE)

This is a spectra fitting package to optimize the position (x), max intensity (y), full width at half maximum (FWHM = width) and the ratio of gaussian contribution (mu) if it's required. It supports three kind of shapes:
This is a spectra fitting package to optimize the position (x), max intensity (y),
full width at half-maximum (FWHM = width) and the ratio of gaussian contribution (mu) if it's required.
It supports three kinds of shapes:

| Name | Equation |
| ------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
Expand All @@ -23,7 +26,9 @@ It is a wrapper of [ml-levenberg-marquardt](https://github.com/mljs/levenberg-ma

## Installation

`$ npm install ml-spectra-fitting`
```console
npm i ml-spectra-fitting
```

## Example

Expand Down Expand Up @@ -184,10 +189,3 @@ const result = {
## License

[MIT](./LICENSE)

[npm-image]: https://img.shields.io/npm/v/ml-spectra-fitting.svg
[npm-url]: https://npmjs.org/package/ml-spectra-fitting
[ci-image]: https://github.com/mljs/spectra-fitting/workflows/Node.js%20CI/badge.svg?branch=main
[ci-url]: https://github.com/mljs/spectra-fitting/actions?query=workflow%3A%22Node.js+CI%22
[download-image]: https://img.shields.io/npm/dm/ml-spectra-fitting.svg
[download-url]: https://npmjs.org/package/ml-spectra-fitting
File renamed without changes.
7 changes: 2 additions & 5 deletions script/benchmark.mjs → script/benchmark.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
/*
You first need to make `npm run prepack` to build the library
To create a benchmark report: `node --prof benchmark.mjs`
*/
// To create a benchmark report: `node --cpu-prof benchmark.js`

import { generateSpectrum } from 'spectrum-generator';

import { optimize } from '../lib/index.js';
import { optimize } from '../src/index.ts';

const nbPeaks = 5;
let peaks = [];
Expand Down