HarlanHeilman / JupyterNotebooks

A testing site for jupyter notebooks. In particular, curve fitting algorithms in a hopefully easy to understand method.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intro to Jupyter

Harlan Heilman

Notebook documents or notebooks are documents produced by the Jupyter Notebook App, which contain both code (e.g. python) and rich text elements (paragraph, equations, figures, links, markdown, etc…). Notebook documents are both human-readable documents containing the analysis description and the results (figures, tables, etc..) as well as executable documents which can be run to perform data analysis.

There are several apps that are used to run notebooks but the most common two are Jupyter Lab for a more modern gui, and the classical Jupyter notebook witch is more bare bones. Luckily, both of these apps come with Anaconda, a one stop shop for most things python and data science.

Installing Anaconda

To install Anaconda, navigate to the web page Anaconda and select to download now. Open the downloaded executable and follow the recomended download instructions.

  • Once we are done instaling Anaconda, navigate to Anaconda Navigator(Anaconda3) and run the program as an admin (This is needed to install packages).

image

Ensure that you are in the base (root) enviroment before proceeding.

image

  • Launch the Powershell Prompt Prompt to open a terminal in the (base) enviroment.

image

Quick Install method

To install the required packages for the notebooks in theis repo, copy and paste the folloiwing line into the terminal and hit enter to run.

pip install numpy matplotlib scipy pandas setuptools wheel uncertainties fabio

This installs the numpy, matplotlib, scipy, pandas, setuptools, wheel, and fabio python packages. This gives you acess to any functions in the packages and allows you to include these functions into any scripts in your (base) enviroment.

Recomended Install Method

It is recomended to build an enviroment that you can use in the future for all your xray data analysis. We do this in anaconda, we first create a new enviroment:

conda create -n xray python=3.7 numpy scipy pandas matplotlib

To enter this new xray enviroment and finish installing packages as needed, copy the lines that dont start with (#)

# Activate environment
conda activate xray

# Install Jupyterlab in the new xray enviroment
pip install jupyterlab ipywidgets chardet 

# Useful  Packages to include
pip install uncertainties setuptools wheel fabio 

# A way you can download a notebook
pip install nbconvert[webpdf]

Once this is done feel free to close your terminal and swap to your new xray eviroment.

image

Opening A Notebook

Once everything above is compleated, start by downloading this repo and you will be able to acess any of the files for your own purposes. Once the repo is installed. Using the Anaconda Navigator, launch JupyterLab. This will open a notebook editor IDE in your default browser. With this open, you will see a side panel that gives you your working directory.

image

From here you will want to navigate to the install location of your github repository. When finished you should see something like this

image

From here we can click to open any files you want I recomend starting with curvefit1.ipynb or Fitting.ipynb. Please reach out with any questions

Downloading Notebooks

For information on downloading notebooks, this website gives a good explaination.

About

A testing site for jupyter notebooks. In particular, curve fitting algorithms in a hopefully easy to understand method.

License:MIT License


Languages

Language:Jupyter Notebook 100.0%