# Neloura

Neloura is a local web application for opening, visualizing, and analyzing
astronomical FITS images.

This package can be run from the command line:

```bash
neloura serve
neloura open path/to/image.fits
```

It can also be used inside Jupyter:

```python
import neloura

neloura.open_fits("path/to/image.fits")
```

In Jupyter, `open_fits()` starts a local Neloura server and displays the full
app in an iframe below the notebook cell. Outside Jupyter, it opens the app in a
browser tab.

On JupyterHub-style remote notebook servers, Neloura automatically uses the
notebook server proxy when `JUPYTERHUB_SERVICE_PREFIX` (or `NB_PREFIX`) is
available, so the same calls work from a browser connected to a remote kernel:

```python
import neloura

neloura.open_app()
neloura.open_fits("path/on/server/image.fits")
```

If `/proxy/<port>/` returns **404** in the browser, the hub image does not have
[`jupyter-server-proxy`](https://github.com/jupyterhub/jupyter-server-proxy)
enabled. Neloura cannot embed in an iframe until that is installed, or you use
SSH port forwarding from your laptop to reach `http://127.0.0.1:<port>/`.

## Development Install

From the repository root:

```bash
python -m pip install -e ".[notebook]"
neloura serve
```

On shared notebook servers where the system Python is not writable, install into
the user environment:

```bash
python -m pip install --user -U neloura
```

## Build

```bash
python -m pip install -U build twine
python -m build
twine check dist/*
```
