dasch

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dasch finds the light curves DASCH holds of a place on the sky: Harvard's Digital Access to a Sky Century @ Harvard, the photographic plates of the Harvard College Observatory, 1880s to 1989, scanned and measured; its final release is DR7.

DR7 serves a light curve only through the Starglass web API, which takes a POST with a JSON body, not an address a GET opens. Its public tier asks for no key.

The API was read on 2026-11-08 from DASCH's page on the DR7 web APIs, its page on the data products, Starglass's page on authentication, and daschlab's source (apiclient.py, lightcurves.py, refcat.py), which is Harvard's own client for it.

A search is two questions. The first, querycat, is a box search of the APASS reference catalogue, the one DASCH prefers, for the sources round a place; each source has two numbers, ref_number and gsc_bin_index.

The second, lightcurve, takes those and answers with one source's raw light curve: every measure of it, flagged or not. Find asks the first and names a light curve of each source in the circle. Each is a product whose address Lightcurves, a web, answers with the second.

The archive is asked only by name.

Index

Constants

This section is empty.

Variables

View Source
var ErrStopped = errors.New("the API asked us to stop")

ErrStopped is the API asking us to stop, by a 429. An asker that has been asked sends nothing more until the time the API gave, so a fetch of many light curves stops with the first refusal.

Functions

func Pages

func Pages() (*celestialdata.Fixed, error)

Pages is the archive of DASCH's own pages the adapter was built from, asked by name only. They are fetched to be kept as the record of what the adapter was read from, in cited-sources, which .game holds out of every release: they are Harvard's.

Types

type Archive

type Archive struct {
	// contains filtered or unexported fields
}

Archive is DASCH DR7's light curves.

func New

func New(doer Doer, agent string, most int) (*Archive, error)

New is DASCH DR7's light curves, asked through doer, naming itself to DASCH by agent, and naming at most so many sources a circle, the nearest first. It refuses no doer, no agent, and fewer than one source.

func (*Archive) ByNameOnly

func (*Archive) ByNameOnly() bool

ByNameOnly says the archive is asked only when it is named.

func (*Archive) Find

func (archive *Archive) Find(near *celestialdata.Near) (
	[]*celestialdata.Product, error)

Find is the light curve of each of the nearest sources of the circle, at most so many, nearest first. The API's search is of a box; a source in the box's corner, beyond the circle, is left out. A circle wider than the API allows is refused before anything is asked.

func (*Archive) Name

func (archive *Archive) Name() string

Name is the adapter's name as the command line takes it.

type Doer

type Doer interface {
	Do(request *http.Request) (*http.Response, error)
}

Doer is what a question is sent through. An *http.Client is one.

type Lightcurves

type Lightcurves struct {
	// contains filtered or unexported fields
}

Lightcurves is a web that asks DASCH for a light curve. Asked for a light curve's address, as Find makes it, it sends the question as a POST, which is the only way DR7 gives one.

It opens the answer as the CSV it holds: the first line the names of the columns, then a line a measure. It asks the web under it for anything else unchanged.

func NewLightcurves

func NewLightcurves(under web.Web, doer Doer, agent string) (*Lightcurves,
	error)

NewLightcurves is a web of light curves over under, asking through doer and naming itself to DASCH by agent. It refuses no web under it, no doer and no agent.

func (*Lightcurves) Get

func (curves *Lightcurves) Get(address string) (io.ReadCloser, int64,
	error)

Get opens what an address holds. For a light curve's address, that is the light curve, as CSV; it asks DASCH once, and no more. An address that is a light curve's but holds no question DASCH takes is an error.

func (*Lightcurves) Head

func (curves *Lightcurves) Head(address string) (int64, error)

Head is the length of what an address holds. A light curve has none until it has been asked for, and asking would be the whole question, so for a light curve it is unsaid.

func (*Lightcurves) Post

func (curves *Lightcurves) Post(address string, form url.Values) (string,
	error)

Post sends a form through the web under it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL