{"id":16125688,"url":"https://github.com/dy/multiscale-array","last_synced_at":"2025-09-06T19:38:41.458Z","repository":{"id":57305398,"uuid":"69396637","full_name":"dy/multiscale-array","owner":"dy","description":"Multiscale representation of an array","archived":false,"fork":false,"pushed_at":"2016-12-05T06:56:38.000Z","size":10,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-03T17:17:43.653Z","etag":null,"topics":["array","data-structures"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-27T20:38:47.000Z","updated_at":"2019-07-23T18:58:33.000Z","dependencies_parsed_at":"2022-09-01T22:40:32.980Z","dependency_job_id":null,"html_url":"https://github.com/dy/multiscale-array","commit_stats":null,"previous_names":["dfcreative/multiscale-array"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dy/multiscale-array","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fmultiscale-array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fmultiscale-array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fmultiscale-array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fmultiscale-array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dy","download_url":"https://codeload.github.com/dy/multiscale-array/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fmultiscale-array/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273954886,"owners_count":25197575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["array","data-structures"],"created_at":"2024-10-09T21:30:40.691Z","updated_at":"2025-09-06T19:38:41.394Z","avatar_url":"https://github.com/dy.png","language":"JavaScript","readme":"# multiscale-array [![unstable](http://badges.github.io/stability-badges/dist/unstable.svg)](http://github.com/badges/stability-badges)\n\nCreate multiple scales representation for an array (see [scale-space](https://en.wikipedia.org/wiki/Scale_space) for the concept). It is simplest form of convolution with resampling, where the upper level is perfectly 2 times less than the lower level, with each value made up of two values from the previous level. Similar to mipmaps, but 1d.\n\n[![npm install multiscale-array](https://nodei.co/npm/multiscale-array.png?mini=true)](https://npmjs.org/package/multiscale-array/)\n\n```js\nconst multiscale = require('multiscale-array')\n\nlet data = Array(1e7)\nlet scales = multiscale(data, {\n\t//max group of samples\n\tmaxScale: 65536,\n\n\t//how to form upper level from two samples of lower level\n\treduce: (left, right, i, level) =\u003e .5*left + .5*right\n})\n\n//recalculate scales for the data range, this is O(2N)\nscales.update(from?, to?)\n\n//replace old data with the new data and recalc scales for it\nscales.update(newData, from?, to?)\n\n//get data for the scale 2⁴\nlet scaleData = scales[4];\n\n//subset scales, i.e. slice all scales, but mutable (!)\nscales.subset(from, to)\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdy%2Fmultiscale-array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdy%2Fmultiscale-array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdy%2Fmultiscale-array/lists"}