Skip to content

Commit

Permalink
Merge pull request #2 from LucasPouw/scanning-paths-feature
Browse files Browse the repository at this point in the history
Added class for scanning paths and fixed a bug crossing prime meridian
  • Loading branch information
jurjen93 authored Nov 30, 2022
2 parents 2b3fa0f + 961309e commit 1620a00
Show file tree
Hide file tree
Showing 14 changed files with 1,506 additions and 449 deletions.
43 changes: 35 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

With this repo you can make a **poster**, a **video**, or **interactive plot** of a full .fits image.

Note that this script is written for **astronomy applications**. However, by rewriting some parts in the script,
Note that this script is written for **astronomy applications**. However, by rewriting some parts in the script,
you can also use it for other types of applications. In the example we used the lockman_hole.fits made with LOFAR.\
Other .fits files from LOFAR can be found here:
https://lofar-surveys.org/

### Clone repo

You need to clone this repo with (in the location you want to have the scripts):\
```git clone https://github.com/jurjen93/advanced_astro_visualization.git```

### Install requirements

Go to ```advanced_astro_visualization``` with:\
```cd advanced_astro_visualization```\
Now you can install the requirements and make aliases to simplify commands with:\
Expand All @@ -20,8 +22,11 @@ If you get permission denied or access error, please give access with:\
```chmod u+x ./setup.sh```

### Catalogue csv file
You need to have a catalogue with sources for the poster (for the video it is optional). We have an example given in the folder 'catalogue'.\

You need to have a catalogue with sources for the poster (for the video it is optional). We have an example given in the
folder 'catalogue'.\
Use the following fields:

* ```source_id``` -> id of the source
* ```RA``` -> right ascension of the object
* ```DEC``` -> declination of the object
Expand All @@ -37,21 +42,37 @@ https://sourceforge.net/projects/scribus/files/scribus-devel/1.5.5/scribus-1.5.5
Run now:\
```makeposter```\
where you can use the following flags
* ```-d``` -> Choose to download a specific fits file from the internet. Use ```1``` if you want to, leave empty otherwise.

* ```-d``` -> Choose to download a specific fits file from the internet. Use ```1``` if you want to, leave empty
otherwise.
* ```-csv``` -> Give a specific csv file with sources to include as cutouts in the poster.
* ```-fi``` -> Fits file to use. (If you don't download your fits file)

Example:\
```makeposter -csv catalogue/catalogue_lockman.csv -fi fits/lockman_hole.fits```

### How to make the video

Run:\
```makevideo```\
where you can use the following flags
* ```-d``` -> Choose to download a specific fits file from the internet. Use ```1``` if you want to, leave empty otherwise.
* ```-csv``` -> Give a specific csv file with sources to include as cutouts in the poster. If you leave it empty, it goes through the whole field.
* ```-fr``` -> Frame rate of the video. Advice is to use ```20``` to make the video smooth but doesn't take too long to record.

* ```-d``` -> Choose to download a specific fits file from the internet. Use ```1``` if you want to, leave empty
otherwise.
* ```-csv``` -> Give a specific csv file with sources to include as cutouts in the poster. If you leave it empty, it
goes through the whole field.
* ```-fr``` -> Frame rate of the video. Advice is to use ```20``` to make the video smooth but doesn't take too long to
record.
* ```-zs``` -> Size in degrees of the zoomed image. If the original image size is smaller than this input, there will be
a zoom out.
* ```-dr``` -> The amount of degrees traversed each second ('degree rate') in the video.
* ```-fi``` -> Fits file to use. (If you don't download your fits file)
* ```-sc``` -> Scanning path type of a pan through the whole field. Can be ```'horizontal'``` or ```'spiral'```. New
paths can be made with the ```paths.py``` script.

The user should be aware that with increasing -zs the -dr value should decrease in order to get a movie that scans
slowly over the image.
The -fr input then controls how smooth the video looks.

Example pan through source by source from your csv file:\
```makevideo -csv catalogue/catalogue_lockman.csv -d 1 -f 60```\
Expand All @@ -60,6 +81,7 @@ Example of pan through a whole field:\
In the video one can see the coordinates. If you want to make a separate image from this, you can run the following:\
```makeimage -fi fits/your_fits.fits -ra 123.123 -dec 51.123 -si 0.4```\
where you can use the following flags

* ```-si``` -> Size in degrees.
* ```-dec``` -> Declination in degrees.
* ```-ra``` -> Right ascension in degrees.
Expand All @@ -69,20 +91,25 @@ See also the following blog for more information:
https://towardsdatascience.com/how-to-make-a-video-from-your-astronomy-images-957f1d40dea1\

### How to make the interactive plot

Run:\
```makeinteractive```\
where you can use the following flags
* ```-d``` -> Choose to download a specific fits file from the internet. Use ```1``` if you want to, leave empty otherwise.

* ```-d``` -> Choose to download a specific fits file from the internet. Use ```1``` if you want to, leave empty
otherwise.
* ```-fi``` -> Fits file to use. (If you don't download your fits file)

Example:\
```makeinteractive -fi fits/your_fits.fits```

### Output

**Poster**: *poster.pdf*\
**Video**: *movie.mp4*\
**Interactive plot**: *interactive.html*

### Contact/Collaboration

Feel free to send me a message if you want to help me out with improvements or if you have any suggestions.\
Contact: jurjendejong(AT)strw.leidenuniv.nl
Loading

0 comments on commit 1620a00

Please sign in to comment.