From 59c226bc0f54bf26c85c9126e9f752f5ced69f61 Mon Sep 17 00:00:00 2001 From: Chris Searle Date: Sun, 14 Jan 2024 13:40:17 +0100 Subject: [PATCH 1/2] Provide a readme for running on mac osx with RStudio --- macosx.md | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 macosx.md diff --git a/macosx.md b/macosx.md new file mode 100644 index 000000000..5d769d459 --- /dev/null +++ b/macosx.md @@ -0,0 +1,80 @@ +# Running on Mac OSX with RStudio + +Currently the embedded application is windows only. + +The application is written in R and uses the shiny web application framework. + +It is possible to run the application from RStudio directly on OSX. + +## Requirements + +The following are needed. + +- [R](https://www.r-project.org/) - the language +- [RStudio](https://posit.co/products/open-source/rstudio/) open source edition - the R development editor/IDE +- [XQuartx](https://www.xquartz.org/) - X Windows for mac - this is the framework that the app expects + +At the time of writing the versions in use were: + +- R: R-4.3.2-x86_64 (intel) / R-4.3.2-arm64 (apple silicon) +- RStudio: 2023.12.0-369 +- XQuartz: 2.8.5 + +## Installation + +You can either install them directly using the links above - or - if you use mac [homebrew](https://brew.sh/) then you can install using that. + +```shell +brew install --cask r +brew install --cask rstudio +brew install ---cask xquartz +``` + +## Application code + +The app code can be downloaded from the github repository download as zip using a browser (and then unzip it in Finder) - or with git: + +```shell +git clone git@github.com:deepskydetail/AstroSharp.git +``` + +## Setup + +Create a working directory somewhere you want to keep the app code: + +Example: + +```shell +mkdir R_WD +``` + +Copy the resources/app directory from the app download into this directory - either via Finder or directly: + +Example: + +```shell +cp -R Downloads/AstroSharp-DualPSF/resources/app R_WD +``` + +Open RStudio - set the working path to R_WD (under Preferences > General > Basic > R Sessions) + +Restart RStudio - at this point - the app folder should appear in the tree in the RStudio window bottom right. + +## Dependencies + +Open app/appPSFBeta.R from this folder tree. + +A warning should appear above the code stating that some packages are required but are not installed - click the `Install` link in the warning. + +At the time of writing there were 58 dependencies that were installed. + +Once complete - in the console area of RStudio (bottom left) - run the following: + +``` +install.packages("remotes") +remotes::install_github("bips-hb/neuralnet") +``` + +## Run the app + +Now all you should need to do is hit the Run App button above the code in RStudio - upload a TIFF and get editing :) From 3ecb8803c6cb649291be4121e433091f9e666757 Mon Sep 17 00:00:00 2001 From: Chris Searle Date: Sun, 14 Jan 2024 13:55:30 +0100 Subject: [PATCH 2/2] Remove extra '-' in brew call --- macosx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macosx.md b/macosx.md index 5d769d459..50f950a87 100644 --- a/macosx.md +++ b/macosx.md @@ -27,7 +27,7 @@ You can either install them directly using the links above - or - if you use mac ```shell brew install --cask r brew install --cask rstudio -brew install ---cask xquartz +brew install --cask xquartz ``` ## Application code