{"id":15358385,"url":"https://github.com/astrofrog/nddata-experiments","last_synced_at":"2026-06-17T08:31:22.658Z","repository":{"id":76728520,"uuid":"227686194","full_name":"astrofrog/nddata-experiments","owner":"astrofrog","description":"Experiments with NDData and subclasses","archived":false,"fork":false,"pushed_at":"2020-04-07T13:09:10.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-05-24T07:42:13.717Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/astrofrog.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-12T20:00:37.000Z","updated_at":"2020-04-07T13:09:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"44fd2148-9224-4438-9f83-ae97e636c5a5","html_url":"https://github.com/astrofrog/nddata-experiments","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/astrofrog/nddata-experiments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fnddata-experiments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fnddata-experiments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fnddata-experiments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fnddata-experiments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astrofrog","download_url":"https://codeload.github.com/astrofrog/nddata-experiments/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fnddata-experiments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34441282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"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":[],"created_at":"2024-10-01T12:41:00.565Z","updated_at":"2026-06-17T08:31:22.636Z","avatar_url":"https://github.com/astrofrog.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Experiments with Converting NDData Types\n\n\nThe objective of this experiment is to provide a protocol for converting\nbetween different subclasses of NDData. So a function designed for a specific\nclass like `Spectrum1D` can also accept any other NDData subclass by providing\na `Spectrum1D.__from_nddata__` method which takes any `NDData` subclass and\nreturns a `Spectrum1D`. So specifc to `Spectrum1D` it could reorder the array\nto have the spectral dimension last.\n\n\nThe decortator provided in this repo then calls this same `__from_nddata__`\nmethod on the input type after the function is called, so the orginal type is\nretuned to the user after the function is called.\n\n\nFor an implementation of `__from_nddata__` see\n[this](https://github.com/Cadair/sunpy/commit/247f90a4540caf393170a0d217a128336fd407b6)\ncommit in SunPy.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrofrog%2Fnddata-experiments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrofrog%2Fnddata-experiments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrofrog%2Fnddata-experiments/lists"}