{"id":38030600,"url":"https://github.com/zfedoran/astrometry.js","last_synced_at":"2026-01-18T13:22:15.005Z","repository":{"id":44454371,"uuid":"121444283","full_name":"zfedoran/astrometry.js","owner":"zfedoran","description":"Extract star pixel coordinates from a FITS image using JavaScript","archived":false,"fork":false,"pushed_at":"2018-02-22T21:23:05.000Z","size":16296,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-14T23:19:45.408Z","etag":null,"topics":["astrometry","astrophotography","emscripten","fitsio","stars"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zfedoran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-13T22:29:28.000Z","updated_at":"2022-12-29T16:29:40.000Z","dependencies_parsed_at":"2022-09-26T16:21:52.908Z","dependency_job_id":null,"html_url":"https://github.com/zfedoran/astrometry.js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zfedoran/astrometry.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfedoran%2Fastrometry.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfedoran%2Fastrometry.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfedoran%2Fastrometry.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfedoran%2Fastrometry.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zfedoran","download_url":"https://codeload.github.com/zfedoran/astrometry.js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfedoran%2Fastrometry.js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["astrometry","astrophotography","emscripten","fitsio","stars"],"created_at":"2026-01-16T19:40:05.183Z","updated_at":"2026-01-16T19:40:05.886Z","avatar_url":"https://github.com/zfedoran.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# astrometry.js\nExtract star pixel coordinates from a FITS image using JavaScript (supported on Node.js and your Browser)\n\n## image2xy\n\nA port of the blind image2xy solver utility from [astrometry.net](http://astrometry.net/) using [Emscripten](http://emscripten.org).\n\n----------------------------------------------------------\n\n#### Install \u003csmall\u003e(Node.js)\u003c/small\u003e\n\n```\nnpm install astrometry.js\n```\n\n#### Usage\n\nRead a FITS image file into a buffer (or `Uint8Array` in the browser, see browser example below))\n\n``` js\nconst fs = require('fs');\nconst buf = fs.readFileSync('./example.fits');\n\nconst image2xy = require('astrometry.js').image2xy;\n\nconst result = image2xy(buf, { verbose: true, extension: 0 });\n```\n\n----------------------------------------------------------\n\n\n#### Install \u003csmall\u003e(Browser)\u003c/small\u003e\n\n``` html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/astrometry.js\"\u003e\u003c/script\u003e\n```\n\n#### Usage\n\nYou'll need to do a little bit of work to get a file buffer on the browser. Live [example](https://jsfiddle.net/cj5sf2h2/17/).\n\n``` js\nvar reader = new FileReader();\n\nreader.onload = function (e) {\n    // Get the image file as a buffer\n    var buf = new Uint8Array(e.currentTarget.result);\n\n    // Get a fits file buffer containing a star list\n    const results = astrometry(buf, { verbose: true, extension: 0 });\n};\n\nreader.readAsArrayBuffer(file);\n```\n\n----------------------------------------------------------\n\n\n### Example\n\nThe following shows an example output.\n\n``` js\nconst result = image2xy(buf, { verbose: true, extension: 0 });\n\n\u003e   infile=fits_buf.fits\n    outfile=fits_buf.xy.fits\n    nhdus=1\n    Got naxis=2, na1=4096, na2=4096\n    simplexy: nx=4096, ny=4096\n    simplexy: dpsf=1.000000, plim=8.000000, dlim=1.000000, saddle=5.000000\n    simplexy: maxper=1000, maxnpeaks=10000, maxsize=2000, halfbox=100\n    simplexy: median smoothing...\n    simplexy: measuring image noise (sigma)...\n    Sampling sigma at 42025 points\n    Nsigma=0.7, s=13.132\n    simplexy: found sigma=13.132.\n    simplexy: finding objects...\n    simplexy: found 734 blobs\n    simplexy: finding peaks...\n    simplexy: found 743 sources.\n```\n\n### Options\n\nYou may use the same options that image2xy supports by providing the flags directly, or you may use the following human friendly versions.\n\n##### Options List\n\n|Option|Flag|Type|Description|\n|------|----|----|-----------|\n|**help**|'h'| boolean | Print available options and usage instructions|\n|**verbose**|'v'| boolean | Print verbose messages|\n|**extension**|'e'| number | Read from a single FITS extension|\n|**downsampleFactor**|'D'| number | Downsample, if necessary, by this many factors of two|\n|**medianFilteringScale**|'s'| number | Set median-filter box size (default 100 pixels)|\n|**psfWidth**|'w'| number | Set Gaussian PSF sigma (default 1 pixel)|\n|**noiseLevel**|'g'| number | Set image noise level|\n|**peakSigma**|'p'| number | Set significance level of peaks (default 8 sigmas)|\n|**saddleLevel**|'a'| number | Set saddle level joining peaks (default 5 sigmas)|\n|**disableBackgroundSubtraction**|'b'| boolean |Don't do (median-based) background subtraction|\n|**backgroundLevel**|'G'| number | Subtract this 'global' background value; implies -b|\n|**outputFilename**|'o'| filename  | Write XYlist to given filename.|\n|**backgroundSubtractedImageName**|'S'| filename  | Save background-subtracted image to this filename (FITS float image)|\n|**backgroundImageName**|'B'| filename  | Save background image to filename|\n|**smoothedImageName**|'U'| filename | Save smoothed background-subtracted image to filename|\n|**maskImageName**|'M'| filename | Save mask image to filename|\n|**blobImageName**|'C'| filename | Save connected-components image to filename|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfedoran%2Fastrometry.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzfedoran%2Fastrometry.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfedoran%2Fastrometry.js/lists"}