Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new deployments #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 57 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Note on usage: Your mileage will vary based on the configuration of the software

* Sigma_image > Sigma_template : This leads to smoothing of the template. Assume that both Psfs are Gaussian, in which case the Gaussian that matches the two has Sigma_match = sqrt(Sigma_image**2 - Sigma_template**2). It is recommended that this be the central Gaussian in your kernel basis, with the smallest one being 0.5 * Sigma_match and the largest being 2.0 * Sigma_match. Set these using the -ng flag. E.g. -ng 3 6 0.5*Sigma_match 4 Sigma_match 2 2.0*Sigma_match.

######### All command line options
## All command line options

```
Version 5.1.11
Required options:
Expand Down Expand Up @@ -139,3 +140,58 @@ Additional options:
CONVOL?? (which image was convolved for each region)
KSUM?? (sum of the convolution kernel for each region)
```

## Installing from sandbox

### Docker

```
docker build docker/ -t hotpants
docker run -it --rm -v /<your-dataset>:/workspace -v /<your-result>:/result hotpants
```

#### LIMITATION

* The path of the docker volume must always be an absolute path or
an environment variable that can be replaced by an absolute path.
(ex: `$PWD`, `$HOME`, ...)

### Snap

[![hotpants](https://snapcraft.io/hotpants/badge.svg)](https://snapcraft.io/hotpants)

```
sudo snap install hotpants --edge

# commands:
# - hotpants
# - hotpants.extractkern
# - hotpants.maskim
```

#### Aliases

```
~$ sudo snap alias hotpants.extractkern extractkern
- hotpants.extractkern as extractkern

~$ sudo snap alias hotpants.maskim maskim
- hotpants.maskim as maskim

# commands:
# - hotpants
# - extractkern
# - maskim
```



#### LIMITATION

* Available only if the dataset is under the `/home` directory.
* https://snapcraft.io/docs/home-interface
* If the location of the home is not common, please refer here: https://snapcraft.io/docs/home-outside-home
* It does not work with network file systems such as NFS or SAMBA.
* See here for use with USB or fuse file system.
1. https://snapcraft.io/docs/removable-media-interface - **Requires manual activation**
2. https://snapcraft.io/docs/fuse-support-interface - **Requires manual activation**
10 changes: 10 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM buildpack-deps:focal AS builder
RUN apt update && apt install -y libccfits-dev
RUN git clone https://github.com/acbecker/hotpants.git /workspace
WORKDIR /workspace
RUN git reset --hard 63e126081509a52e96260acdcf2f77b31096c173 # Version 5.1.11
RUN make clean && make

FROM ubuntu:focal
RUN apt update && apt install -y libccfits-dev
COPY --from=builder /workspace/extractkern /workspace/hotpants /workspace/maskim /usr/local/bin/
41 changes: 41 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: hotpants
base: core18
type: app
version: 'v5.1.11-snap0.1'
website: https://ui.adsabs.harvard.edu/abs/2015ascl.soft04004B/abstract
summary: High Order Transform of Psf ANd Template Subtraction
description: |
It photometrically aligns one input image with
another after they have been astrometrically aligned.
grade: devel
confinement: strict
license: MIT
architectures: [amd64]

parts:
hotpants:
plugin: make
source-type: git
source: https://github.com/acbecker/hotpants.git
source-commit: 63e126081509a52e96260acdcf2f77b31096c173 # Version 5.1.11
build-packages:
- libccfits-dev
stage-packages:
- libcfitsio5
override-build: |
make clean ; make
mkdir -pv $SNAPCRAFT_PART_INSTALL/bin/; \
mv -v $SNAPCRAFT_PART_BUILD/maskim \
$SNAPCRAFT_PART_BUILD/extractkern \
$SNAPCRAFT_PART_BUILD/hotpants \
$SNAPCRAFT_PART_INSTALL/bin/
apps:
hotpants:
command: bin/hotpants
plugs: [home, removable-media, fuse-support]
maskim:
command: bin/maskim
plugs: [home, removable-media, fuse-support]
extractkern:
command: bin/extractkern
plugs: [home, removable-media, fuse-support]