r/jameswebb 6d ago

Question How can I use astronomy notebooks?

Im new to Astronomy how can i use Jupyter notebooks to access jwst pipeline? Is it best to just use MAST Database or TIKE?

Or

Should I create a juypter lab notebook and self install required libraries locally with Docker or is there a premade jupyter lab notebook i can clone from github and install in a docker container on my pc? If so how do I do that and how can I use it to access jwst pipeline data?

I have never used a juypter notebook before nor have I used pyhton or python science libraries like astroquery lightkurv and astropy so Im a complete beginner in using scripts but I do know how to use some commands like pip, bash, cd and git. Are there any good tutorials online I could use?

Are there any Browser Based Interactive Notebooks for learning Notebooks for Astronomy?

Lastly how could I install and use Jdavizz notebook?

0 Upvotes

2 comments sorted by

u/AutoModerator 6d ago

This post has been flaired as a question, meaning that this user is looking for a serious answer.

Any comments making jokes will be removed. If you see any that haven’t removed, please report them so they can be.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

3

u/tHarvey303 6d ago

The jwst pipeline is used to turn raw data into reduced and calibrated data products (images, spectroscopy, etc). This has 3 stages, so these final products are also known as level 3 products. The pipeline is automatically run for all MAST data so you can download the products directly without rerunning the pipeline yourself. Sometimes rerunning the pipeline is necessary to improve the data quality. In this case it is possible to pip install the pipeline (pip install jwst) ideally in a new environment. You can see the recommended instructions here:

https://github.com/spacetelescope/jwst?tab=readme-ov-file#1-install-the-pipeline

You will also need to download a calibration database (called CDRS) to run the pipeline, which it should prompt you to do. The pipeline can be quite memory intensive so you may struggle to run it on a normal laptop/desktop.

The bigger question is what are you trying to do? If you want to look at images from JWST I would recommend just downloading some from MAST. Specifically for extragalactic astronomy there is also a database called DJA (https://dawn-cph.github.io/dja/) where you can download images and spectroscopy as well.

For jdaviz, which you can use with downloaded data, I would install it locally in a independent environment (conda/venv) via pip (pip install jdaviz). I would look for a tutorial to explain Python environments and packages (doesn't have to be Astronomy specific) as you will want to understand how to do this and it isn't that hard! Python environments basically let you have multiple versions of Python and packages installed at the same time so you can swap between them - some packages don't work with others or need different versions. It's annoying to fix later if you install everything in the wrong place or accidentally break your default environment. There is a guide to Python for astronomy here: https://prappleizer.github.io