15 mar 2024

deep sky detail on linux

Firstly a big call out to (I think this is the author although not sure) Mark Lowry for all the work that has been put into this. Donation page.

We're not sure what the app is called. Some refer to it as AstroSharp. Others, AstroClean or dualPSF. The title on-screen gives Deep Sky DeTools

Not many clues as to how to get started under Linux. Here's an attempt to explain how I managed it. This is for Ubuntu 22.04.3. Disclaimer: I'm an end user. Please don't laugh at my Linux skills.

- download and install R
Ubuntu has r-base r-base-dev but it seems you need more stuff. Installing rstudio which pulls R too, seems to do the trick. We found what we think is the latest version here. Install it:

sudo dpkg -i rstudio-2022.07.2-576-amd64.deb

give yourself write:
sudo chown -r steve /usr/local/lib/R

- download the code from github.

git clone https://github.com/deepskydetail/AstroSharp.git

- create a script
(thanks to all at the github page from where this script was copied/inspired/tweaked)

#!/bin/bash
# INSTALL DEPENDENCIES #
# List of packages
packages=("shiny" "shinycssloaders" "neuralnet" "dplyr" "ggthemes" "tiff" "htmltools" "reshape2" "waveslim" "imager" "bslib" "parallel" "foreach" "doParallel" "doSNOW" "remotes" "shinyWidgets")
# Loop and install what's needed
for package in "${packages[@]}"
do
    R --no-echo -e "if (!require('${package}', character.only = TRUE)) install.packages('${package}', repos='http://cran.rstudio.com/')"
done
# Install 'neuralnet' package from GitHub
R --no-echo -e "remotes::install_github('bips-hb/neuralnet')"

# Run the R script. Change the folder to wherever you located your AstroSharp git.

R -e "shiny::runApp('/home/steve/AstroSharp/resources/app/app.R',launch.browser=TRUE)" --no-save

We created our script in the AstroSharp folder and called it a-sharp. In the AstroSharp folder,
make it executable:
chmod +x a-sharp 

- launch the script
./a-sharp

That will probably give you an error telling you that imager is missing. So...

- install imager from within an R session

steve@cocina:~$ R

R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

[...]

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

>
install.packages("imager")

- open google-chrome

- launch the app

R -e "shiny::runApp('/home/steve/AstroSharp/resources/app/app.R',launch.browser=TRUE)" --no-save

the app under kubuntu

No hay comentarios:

Publicar un comentario