Skip to content

Remote Analysis

Remote Analysis is where spectra, images and photometry tables are measured: a line's profile, the continuum, epochs stacked, radial velocities, a redshift. Each analysis runs on CANFAR, in your own compute session, and is kept in a project with what it ran on. It is locked until you sign in. Open it from its Home tile, or Go ▸ Remote Analysis.

Its screen is Spec Viewer's, with a project: the project's bar and its sources on the left, the plot, and the side pane's Source · Analyses · Project. Its plot, its lines, its marks and its Export… are Spec Viewer's, and so is what its Source pane says of a file: see Spec Viewer.

Projects

A project keeps spectra worked on together — images and photometry tables too — and how they are shown: their units, the line lists and z, and the one selected. It saves itself as you change them: the badge beside its title says when it was last saved. A save that takes over a second is on the activity bar at the bottom of the window while it runs; one that fails, or waits for your storage, stays there with Retry, and a warning sign shows beside the title. It refers to each file where it is: nothing is moved or copied into it, and taking a file out of it never deletes the file. Marks are not copied into it either: they stay with each file, so a file shows its marks in any project, and outside one.

  • Where it is kept. In your CANFAR storage first, in Verbinal-Analysis/<folder>/project.json: it opens on any Mac you sign in on, and offline from this one, from this Mac's copy. On this Mac when you choose so, and when your account has no CANFAR storage. Remote Analysis says that once, and then a laptop badge beside the project's title says it. A cloud badge means storage.
  • With no project, Remote Analysis offers New Project… and Open Project.
  • New Project…: its title and where it is kept. It starts empty. With files open, you are asked Add what is open to “…”? — Add, or Start Empty, which closes them; their files stay where they are.
  • A title is one project's. One like another project's, whatever its case, is refused, and the same title with today's date is offered. Its folder is the title as CANFAR storage takes a name ("NGC 6720 North" in NGC_6720_North), with the time added when that folder is taken.
  • A project open shows its sources, even none: its list on the left, with Add Source under it.
  • Project, the side pane's third tab: the title and notes, which you can change; where it is kept; how many sources and runs it has. A new title keeps the project's folder as it was made.
  • A file this Mac does not have stays in the project, listed under Not on This Mac. Locate… finds it where it is now, and it is shown as it was kept; opened from Research or your storage, it is shown too. Remove from Project, in its menu, takes it out.
  • An assistant adds a file to the project open only when its call says so, and takes one out only as Remove from Project does: the file stays. The bar says which — An assistant added b.fits., with Remove from Project, or An assistant removed b.fits from the project., with Put It Back — and a title or notes it changes are proposals of the notes kind: they apply at once or wait in Pending, as your setting for notes says (Settings ▸ AI Agent).
  • The project menu, over the sources:
  • New Project…, as above.
  • Open Project: every project by its title, a cloud for storage and a laptop for this Mac. It opens each file from where it is: your storage, Research, or this Mac. Its sources are listed at once, each with Opening… and a spinner until its file is read, and the source selected is the one the project had selected.
  • Copy to CANFAR Storage…: a project made on this Mac, once you are signed in. It opens from storage after, and the copy on this Mac stays until you remove it.
  • Remove the Copy on This Mac…: only for a project that is in your storage too. It stays there.
  • Close Project: the project and its spectra.
  • Delete Project… (also at the foot of the Project tab): its file and its runs, with their results, go from where it is kept — your CANFAR storage and the copy of it on this Mac, or this Mac. You are told first what goes and what stays: the files it refers to stay where they are, with their marks. Not offline: your storage is asked first.
  • Deleted on another Mac. A project deleted on another Mac, or in Storage, is not saved back there from this one: the bar says so, and what this Mac shows stays open until you close it.
  • Two Macs. Each save is one revision on. When another Mac saved the project since this one read it, the two are merged field by field: a spectrum either added is kept, and where both changed the same thing, storage's is kept. Without the network, changes are kept on this Mac (the bar says so) and sent with the next save.

Sources

A project's sources come in through Add Source, under its list:

  • From This Mac… adds a file at once, and so does a file dropped onto Remote Analysis.
  • From Research and From Storage take you there: open the file in Spec Viewer to look at it, then Add to Project puts it in (see Into a project).

A file opened from another screen opens in Spec Viewer, never in the project: nothing asks.

A source's menu has Remove from Project: it takes the file out of the project and never deletes it, and Edit ▸ Undo puts it back as it was. Show in Finder shows its file.

Delete…, below it, is the file itself, and asks first. It names the other projects that refer to the file — they keep it, shown as not found — and who deletes it: a file only this Mac has goes to the Trash (and out of the project) with Move to Trash; one Research keeps is deleted there, by Research's rules (Show in Research); one from your storage is deleted in Storage, which asks first (Show in Storage).

Analyses

An analysis measures something from the spectra open, and says how far to trust it. Each runs on CANFAR: Verbinal's analysis code, on the compute image you choose, in your compute session and on your allocation. None of it runs on this Mac, and each run is kept, with everything it ran with, so it can be read again, changed and run again. Source · Analyses · Project, over the side pane, shows them.

Getting ready

The chip at the top of Analyses says whether CANFAR analyses can run. Get Ready… chooses the compute image (it is also in Settings ▸ AI Compute) and checks it: Verbinal puts its analysis code in your storage, in .verbinal/analysis/<version>/; checks the image's Python and the packages each analysis needs; and works out one known answer for each package and each analysis. A wrong answer blocks only what it is about: a package's, the analyses that need that package; an analysis's, that analysis. The chip says which, and Get Ready… what to do.

The chip also names the image analyses run on: the running session's, or else the one chosen. On a session where Verbinal's runner does not answer, it says no runner. Analyses are then blocked until you choose an image with the runner and stop the session (see Remote Compute).

Setting one up

Analyses has three parts: Analysis, Result and Runs.

  • Analysis lists the analyses. Choose one and the list folds to it, with its form: the spectra to run on (tick them when it takes more than one), the Band — The whole spectrum or the band selected on the plot — and its values, each with what it does and its default. Values on the axis, and ranges of it such as Baseline's Leave out, are typed in the unit the plot shows, km/s too — a range as you would write it, 6555–6570, 6580–6590, a hyphen or to too. Change the unit and what you typed follows it. A run is set up in the spectrum's own unit on a velocity axis (GHz for a radio spectrum), as it keeps no rest, and its record says the unit. Some values are filled for you, said under the field, until you type your own: a line's Starting centres from the band's strongest peaks; Leave out from the spectrum's band marks, those inside the band when the run is on it; and Line moments' Channel rms and Baseline's channels from the spectrum's Baseline run — "From Baseline, run …". The rms is filled only for a spectrum without errors, and the channels only on Baseline's own Subtracted spectrum, the one its baseline was taken off.
  • Before you run, what Verbinal can see of the spectra and the form is said over Run: a spectrum with no error column, one that does not say air or vacuum, spectra in air and in vacuum, in different frames or some corrected and some not, a band left selected that the analysis would not use. Each says what it changes in the result, and has its buttons: one changes the form, one changes it and runs, one says what the file does not (below). An assistant is given the same list, with the same buttons.
  • A run that can find nothing waits, and the reason is under Run. One case is a band that holds none of a spectrum's points; the reason gives where the spectrum's points are. The other is a Template redshift of a spectrum the templates cannot reach at any redshift tried, such as a radio line. The templates run from the ultraviolet to the near-infrared, stretched up to the Largest redshift. An assistant is told the same, before anything is sent.
  • A run needs a project. Each run is kept in the project that is open, so Run waits until one is: choose New Project… or Open Project from the project menu. A run never makes a project by itself. An assistant is told the same, with the projects that already hold the spectrum.
  • Run stays in sight at the bottom of the pane. While a run goes, it says each step and how long it has taken: putting Verbinal's analysis code in your storage, checking the compute image, sending the spectra, starting your compute session when it is not up, running, and reading the result. A run that fails says why and what to do; Details gives the rest.

Reading a result

  • Result says first what may be wrong with it — each warning with its buttons, such as "Widen to 400 km/s and run again" — then each value with its σ and unit, written to the figures its σ allows, then what it ran on: the spectra, the band, every value and what you said of the spectra.
  • While Analyses is showing, in any of its parts, the plot shows the result over the spectrum it ran on: the model fitted, the continuum, the stack, and the band. Its key is there while some of the result is in view. With Source chosen, the plot is the source's alone.
  • Change and Run Again puts the run's spectra, band and values back in the form, to change and run.
  • Show Code shows the code that ran, and a Python script that gives this run's numbers again from its own spectrum, values and seed. Open in Remote Compute puts that script in Remote Compute's editor, to change and run yourself.
  • Copy Values and Export… take the values, the series and the figure.
  • A product that holds spectra — Stack epochs' stack, Normalize continuum's normalized spectrum — has Open as a Source: it goes into the project at once and is shown, the spectrum the run made first, then the others it holds (each epoch; the spectrum as read and its continuum), to measure as any source. Pressed again, it shows the one already there. The project refers to the product where the run kept it. Its Source pane says Made by: the analysis, the run and its sources.
  • While the axis shows a velocity, a fit's Result gives, under its values in the data's unit, what a radio astronomer reports: the centre as a velocity, the FWHM and the σs as velocity widths, and the line flux as an integrated intensity, such as K km/s. A band chosen, or a centre typed, on a velocity axis goes to a run in the spectrum's own unit.

Runs

Each run is kept in the project, in runs/<id>/: its request, the spectra it ran on, its result and run.json, its record. Runs lists them, a failed one too, each with what it found, such as a line's centre. Choose one to read it in Result; Delete Run… deletes it and its products; Export All Runs… writes every finished run of an analysis as one table, a row each. Run always runs: an earlier run of the same spectra and values stays in Runs, beside the new one.

What a run takes of the file

A run takes each spectrum as its Source pane says it, with what you said the file does not say (see What the file does not say). What you say is kept with the spectrum in the project; a run says it used it, and a run with another fact is a new run.

The analyses

Analysis Where it runs What it does How Tool
Fit line profile On CANFAR Fits one to three Gaussian or Voigt components and their continuum to a line in a band, each value with its σ. astropy.modeling Gaussian1D or Voigt1D components on a constant or linear continuum, fitted by trust-region least squares on scaled data; each σ from refits of Monte Carlo draws of the per-channel errors, widened by √χ²ᵣ when χ²ᵣ is beyond three times its spread above 1, unless asked otherwise spec_fit_line_profile
Line moments On CANFAR Measures an emission line's integrated intensity, centroid and dispersion over a window, on a zero baseline, without assuming its shape. Over the band's channels, each as wide as half the distance between its neighbours, of a line on a zero baseline: moment 0 the sum of flux times width, moment 1 the flux-weighted centroid and moment 2 the flux-weighted dispersion, these two optionally over the channels above a clip in σ; each σ propagated to first order from the channels' errors or the rms given, the channels' noise taken as independent — not the baseline's uncertainty unless the baseline's channels are given, never the calibration's spec_line_moments
Normalize continuum On CANFAR Fits the continuum under a spectrum, leaving its lines out, and divides the spectrum by it. scipy least-squares cubic spline on fixed knots (LSQUnivariateSpline) or running median through the continuum points, found against a running median and then by iterative asymmetric σ-clipping; σ the larger of each point's error and the continuum points' scatter; the S/N from that scatter's robust measure, 1.4826 × the median absolute deviation, widened for the tails the clipping cut spec_normalize_continuum
Baseline On CANFAR Fits a polynomial to a spectrum's line-free channels and takes it off, saying the rms of what is left. numpy.polynomial.Polynomial.fit of the chosen order, by least squares, to the channels outside the line windows — or, without windows, to those that iterative clipping keeps: a channel whose residual, over its σ when the file has errors, is more than 3 × their robust rms (1.4826 × the median absolute deviation) from their median is left out with one channel each side — each weighted by 1/σ when the file has errors; the subtracted spectrum keeps each channel's σ, else the rms spec_baseline
Stack epochs On CANFAR Puts several spectra of one source on one grid and combines them. Spectra put in the first's units (astropy), air in vacuum when both are there, each not yet in a frame in the barycentric one (astropy) unless asked otherwise, resampled conserving flux onto the coarsest one's points over the stretch all share, optionally scaled to the first by the median ratio, then combined by the inverse-variance weighted mean or the median spec_stack_epochs
Radial velocity On CANFAR Measures each spectrum's velocity against the first, to see whether a star's velocity changes. Spectra on one logarithmic grid, telluric bands left out and the continuum taken off, cross-correlated with the first, each channel weighted by its σ; astropy's barycentric correction for those not already in a frame; each σ from Monte Carlo draws of the per-channel errors on each spectrum's own pixels, lightly smoothed, each draw prepared and measured as the data, or from the scatter between stretches of the spectrum when that is well beyond them spec_radial_velocity
Template redshift On CANFAR Finds a spectrum's redshift from the quasar, galaxy or star in CADC's archive that it looks most like. The spectrum and a small library of real spectra from CADC on one logarithmic grid, continua taken off and strong lines softened; each template's best amplitude fitted at every redshift, weighted by the spectrum's σ; σ from the fit's curvature, or from the scatter between stretches of the spectrum when that is well beyond it, with the library's own 250 km/s added spec_template_redshift

Line moments measures an emission line on a zero baseline: on a line over a continuum, or a normalized spectrum, moment 0 would be the continuum's. Run Baseline first, then Line moments on its Subtracted spectrum; the result says when the window's ends are not at zero, and a normalized spectrum is said before the run. Its σ is from the channels' noise, taken as independent; with Baseline's channels, σ of the integrated intensity holds the baseline's own error too — the result's What σ covers says which. Neither holds the calibration's, often 10 % or more, nor the correlation between the channels of a smoothed or regridded spectrum. Baseline without windows finds the line by clipping, and says what clipping cannot do: a curved baseline (order 3 or more) that can follow a broad line, and clipping that has not settled. A window that holds none of the spectrum's channels is said, and windows that all hold none are refused.