diff --git a/README.md b/README.md index 36453ac..77b334d 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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 /:/workspace -v /:/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** diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..18a4325 --- /dev/null +++ b/docker/Dockerfile @@ -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/ diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000..81ee258 --- /dev/null +++ b/snap/snapcraft.yaml @@ -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]