This software was developed for use with Skynet's 20-m radio telescope located in Green Bank, West Virginia. It has been integrated into the Skynet and automatically processes radio observations.
For a full description of the algorithm, see our systems paper: SKYNET ALGORITHM FOR SINGLE-DISH RADIO MAPPING.
The Radio Development Project (RDP) will run on both Windows and Linux. It's possible that it will run on MacOS, but we have never attempted that internally.
Most of these instructions are condensed from the install docs for each library. If any of these steps fail, it is recommended to go to the following links for additional details and alternative methods: CMake, ZLIB, CFITSIO, CCFITS, FFTW.
CMake can be freely downloaded from http://www.cmake.org. It is recommended that you choose the "Add CMake to the system PATH for current user" option during the installation setup process for convenience when running CMake later on.
ZLIB can be freely downloaded from https://zlib.net. Once downloaded, unpack it, then build and install it from a parallel directory, for example:
mkdir zlib.build
cd zlib.build
cmake ..\zlib-1.2.11 -DCMAKE_INSTALL_PREFIX=c:\Users\myname\zlib
cmake --build . --config Release
cmake --install .
The cmake comands below will use the path "c:\Users\myname\zlib" as an example for the installed zlib location.
CFITSIO can be freely downloaded from http://heasarc.gsfc.nasa.gov/fitsio. CFITSIO is a dependency for another library (CCFITS) that we use to read in the data files.
Unzip the CFITSIO .zip file. This will create a new \cfitsio-4.2.0 subdirectory that contains the
source code and documentation files. Version 4.2.0 is the most recent release as of writing, but
future releases should work OK.
Open the Visual Studio Command Prompt window and cd into the parent directory that is one level
above the directory containing the CFITSIO source files that was created in the previous step.
Create a new subdirectory, and cd into it with the following commands:
mkdir cfitsio.build
cd cfitsio.build
Create the CMake files necessary for the build by running (replace the path with the location to ZLIB):
cmake ..\cfitsio-4.0.0 -DCMAKE_PREFIX_PATH=c:\Users\myname\zlib
Execute the following command to build the CFITSIO library:
cmake --build . --config Release
cmake install .
The "." argument following "--build" here tells CMake to build the files in the current directory (i.e., in "cfitsio.build"). If this process completes successfully, you should find the CFITSIO library files in the "cfitsio.build\Release" subdirectory.
If anything went wrong, try checking the CFITSIO README. for additional details on this process.
CCFITS can be freely downloaded from https://heasarc.gsfc.nasa.gov/fitsio/CCfits/. After unzipping and
untarring the CCfits source code tarball, the source code will appear in a new \CCfits subdirectory.
Open the Visual Studio Developer Command Prompt window and create a directory named CCfits.build
parallel to this CCfits source code directory. Run the following command:
mkdir CCfits.build cd CCfits.build
Create the CMake files necessary for the build, bukd, then install by runnning:
cmake.exe -G"NMake Makefiles" -DCMAKE_PREFIX_PATH=C:\path\to\your\CFITSIO ..\CCfits
nmake
namke install
FFTW3 can be freely downloaded from http://www.fftw.org/install/windows.html. The developers provide pre-compiled Windows DLLs for you to use. You should be able to call them from any compiler. In order to link to them from Visual C++, you will need to create .lib "import libraries" using the lib.exe program included with VC++. Run:
lib /def:libfftw3-3.def
lib /def:libfftw3f-3.def
lib /def:libfftw3l-3.def
On Visual Studio 2008 in 64-bit mode, and possibly in other cases, you may need to specify the machine explicitly:
lib /machine:x64 /def:libfftw3l-3.def
You can generate a Visual Studio solution with CMake. From a Developer Command Prompt, create a
build directory (for example, build) parallel to the source tree and run:
cmake -S . -B build -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
If your dependencies are installed outside the default search paths, add them to
CMAKE_PREFIX_PATH, e.g. -DCMAKE_PREFIX_PATH="C:/path/to/cfitsio;C:/path/to/fftw".
The generated solution builds the radio-cartographer executable and the
radio_cartographer library target.
Use the CMake-based build instead of the old compileStandard.sh script. A typical build looks like:
mkdir -p build
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="/path/to/fftw;/path/to/cfitsio" \
-DBUILD_PYTHON_BINDINGS=OFF
cmake --build build
Key notes:
- The project depends on FFTW3, CFITSIO, CCFITS, pthreads/Win32 threads, and nlohmann_json (automatically fetched if not already available).
- Set
BUILD_PYTHON_BINDINGS=ONto build the shared library with position-independent code and default symbol hiding for Python wrappers. - Run
cmake --install build --prefix /your/prefixto install the executable, library, headers, and CMake package config under the chosen prefix (/usr/localby default).
RDP takes an ever growing number of parameters via the command line.
https://stackoverflow.com/questions/298708/debugging-with-command-line-parameters-in-visual-studio
We have written a run script called run2.sh that describes every input parameter and provides an
interface to modify them. Simply specify the path to the input .FITS file, modify your inputs,
and then run the script.
added by Reed Fu, May 13 2024
Download and install CLion from [here].(https://www.jetbrains.com/clion/download/) It's free for students or researchers at academic institutions.
Open the project in CLion.
Install Docker Desktop from [here].(https://www.docker.com/products/docker-desktop)
In the terminal (either in CLion or your terminal of choice), under the project root directory, run:
docker build -t radio-cartographer .This will build the docker image, and name it as radio-cartographer.
You could run a container from the image interactively inside docker app by running:
docker run -d -it --name rc -v "$(pwd)":/skynet/radio-cartographer radio-cartographer:latestHowever, it's way easier to run and debug the code in CLion.
First we want to set up the remote toolchain in CLion.
Open settings, then go to Build, Execution, Deployment -> Toolchains.
Click the + button, and select Docker.
Select the image as radio-cartographer:latest, and open the container setting popup.
We don't need to configure port bindings,
but we need to bind your local project directory to the container's /skynet/radio-cartographer directory.
Click OK to save the settings.
In the top right corner, you can select the tool chain and the run configuration.
There should be a debug configuration already set up for you, click the hammer icon to build the project.
Then click the green triangle to run the project. You can also set break points and debug the code.
The working directory is set up to be ./testing/tmp, all output txt will be ignored by git.
You can modify which file to run by changing the arguments in the configuration. Just be aware that since everything is running inside the container, it's the easiest to copy your file to /testing, and only modify the filename in the arguments.
You can also modify all the other RC arguments. Good luck figure out what each of them does. :)
To configure Antigravity to use the Docker environment, use the provided docker-shell.sh script. This script acts as a bridge between the local filesystem and the Docker container's build environment.
-
Ensure the script is executable:
chmod +x docker-shell.sh
-
Configure Antigravity Terminal Profile: Since Antigravity is based on VSCode, you can configure the integrated terminal to use the Docker environment automatically.
- Open the Command Palette (
Cmd+Shift+Pon Mac,Ctrl+Shift+Pon Windows/Linux). - Type
Preferences: Open Settings (JSON)and select it to open yoursettings.jsonfile. - Add the following configuration to the file.
Note: Change
osxtolinuxorwindowsin the property keys depending on your operating system."terminal.integrated.profiles.osx": { "Docker Sandbox": { "path": "${workspaceFolder}/docker-shell.sh", "icon": "container" } }, "terminal.integrated.defaultProfile.osx": "Docker Sandbox"
- Open the Command Palette (
There is a standard set of testing files used for regression testing and validation. These files are automatically downloaded during the Docker build process and are located at:
/skynet/test_standards_static
If you are running the code locally without Docker, you can download these standard files from the following link: Standard Testing Files (Dropbox)