/ADFSSN

Primary LanguageJupyter Notebook

Sunspot Series Reconstruction Repository

Welcome to the repository for different bits and pieces of code assembled with the aim of achieving the best possible Sunspot Group Series reconstructions and the collection of different techniques and approaches.

Setting Up Your Modeling Environment

Requirements:

  • Anaconda Python 3 installation.
  • pyemd package.

Anaconda Installation

You can find instructions for anaconda installation here:

Updating Conda Environment and Installing Pyemd

  1. Start a terminal. You can find instructions for opening terminals here:
  1. Run the following commands. They will update your python environment and install Pyemd.

conda update --all
conda install astropy
pip install pyemd

Clone or Download this Repository

Click on the Clone or download button and clone it to a repository or download it as a zip file.

GitHub Logo

If you want help cloning the repository and don't know how to do it let me know. Otherwise, simply download the files and unpack them on a folder in your computer.

Running the Jupyter Notebooks

  1. Open a terminal (see above).

  2. Navigate to the folder where you unzipped the repository. Here are some quick tutorials to use the terminal:

  1. Run the following command:

jupyter notebook --NotebookApp.iopub_data_rate_limit=10000000000

The jupyter notebook command is normally sufficient, but the visualizations I'm including have a data rate limit to high for the defaults. There is a way of fixing this permanently, but you need to mess up with configuration files. More here:

  1. Open the notebook. Launching jupyter should open the dashboard in your folder. Something that looks like this:

Jupyter Dashboard

Click on the notebook you want to open.

  1. Run all cells or the cells you want. For more information about running cells please see:

Jupyter Notebook Documentation:

More information about the Jupyter notebook can be found here:

Running the Scripts:

When running the scripts with parallel processing enabled, some system encounter the following error:

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.

To fix this issue, find your matplotlibrc file by going into the python environment you are using and running the commands:

>>> import matplotlib
>>> matplotlib.matplotlib_fname()
'/home/foo/.config/matplotlib/matplotlibrc' # This output shows where your matplotlibrc file is located

Find the line in this file where 'backend' is defined; it should look like this.

backend      : TkAgg

Comment out this line with a leading '#'. This change sets the matplotlib backend to use the default non-interactive version. Interactive versions of the matplotlib backend (like the Tkinter based backend shown above) can cause issues with multiprocessing.