https://github.com/mljs/integral-transforms
https://github.com/mljs/integral-transforms
hacktoberfest
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mljs/integral-transforms
- Owner: mljs
- License: mit
- Created: 2022-09-26T05:32:21.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-25T18:33:35.000Z (over 2 years ago)
- Last Synced: 2025-01-05T12:12:27.627Z (6 months ago)
- Topics: hacktoberfest
- Language: TypeScript
- Homepage:
- Size: 657 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# integral-transforms
[![NPM version][npm-image]][npm-url]
[![build status][ci-image]][ci-url]
[![Test coverage][codecov-image]][codecov-url]
[![npm download][download-image]][download-url]
![]()
A tool for line broadening through integral transforms.## Installation
`$ npm i ml-integral-transforms`
## Usage
```js
import { integralTransform } from 'integral-transform';const signal = [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.4, 0.3, 0.2, 0.1, 0];
const broadedSignal = integralTransform(signal, { kernelWidth: 7 });
// [0.04, 0.12, 0.24, 0.53, 0.80, 1, 0.80, 0.53, 0.24, 0.12,0.04]
```**Arguments**
* `array`: Vector containing the inputs.
**Options**
* `shape`: Define the shape of the kernel (default: 'triangular').
* `kernelWidth`: Set up the length of the kernel to perform the convolution (default: 7).**Shapes**
* Triangular
* Gaussian
* Lorentzian## License
[MIT](./LICENSE)
[npm-image]: https://img.shields.io/npm/v/ml-integral-transforms.svg
[npm-url]: https://www.npmjs.com/package/ml-integral-transforms
[ci-image]: https://github.com/mljs/ml-integral-transforms/workflows/Node.js%20CI/badge.svg?branch=main
[ci-url]: https://github.com/mljs/ml-integral-transforms/actions?query=workflow%3A%22Node.js+CI%22
[codecov-image]: https://img.shields.io/codecov/c/github/mljs/ml-integral-transforms.svg
[codecov-url]: https://codecov.io/gh/mljs/ml-integral-transforms
[download-image]: https://img.shields.io/npm/dm/ml-integral-transforms.svg
[download-url]: https://www.npmjs.com/package/ml-integral-transforms