Documentation
¶
Overview ¶
Package dasch finds the light curves held by the archive at 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 the archive'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 preferred reference catalogue, 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 ¶
const Host = "api.starglass.cfa.harvard.edu"
Host is the host the questions go to, in lower case with no dot at its end, as the web package names a host. It is root's host; a test holds the two together.
Variables ¶
var ErrStopped = errors.New("DASCH is not being asked")
ErrStopped is Starglass not being asked: it asked us to stop, the wait it asked for has not passed, or the circuit is open for this run. The error also holds the *web.Stopped that says which. A fetch of many light curves stops with the first stop.
Functions ¶
func Pages ¶
func Pages() (*celestialdata.Fixed, error)
Pages is the archive of the service'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 the archive's DR7 light curves.
func New ¶
New is DR7's light curves, asked through doer, naming itself to the archive 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 ¶
ByNameOnly says the archive is asked only when it is named.
type Doer ¶
Doer is what a question is sent through. An *http.Client is one, and so is what web.Through gives, which is how a run on the network asks: see Policy.
type Lightcurves ¶
type Lightcurves struct {
// contains filtered or unexported fields
}
Lightcurves is a web that asks the archive 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 ¶
NewLightcurves is a web of light curves over under, asking through doer and naming itself to the archive 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 the archive once, and no more. An address that is a light curve's but holds no question it takes is an error.