Troubleshooting

This page is an attempt to keep track of common errors and instructions for how to fix them. If you encounter a bug not listed below, fork ares on bitbucket and an issue a pull request to contribute your patch, if you have one. Otherwise, shoot me an email and I can try to help.

Plots not showing up

If when running some ares script the program runs to completion without errors but does not produce a figure, it may be due to your matplotlib settings. Most test scripts use draw to ultimately produce the figure because it is non-blocking and thus allows you to continue tinkering with the output if you’d like. One of two things is going on:

  • You invoked the script with the standard Python interpreter (i.e., not iPython). Try running it with iPython, which will spit you back into an interactive session once the script is done, and thus keep the plot window open.
  • Alternatively, your default matplotlib settings may have caused this. Check out your matplotlibrc file (in $HOME/.matplotlibrc) and make sure interactive : True.

Future versions of ares may use blocking commands to ensure that plot windows don’t disappear immediately. Email me if you have strong opinions about this.

IOError: No such file or directory

There are a few different places in the code that will attempt to read-in lookup tables of various sorts. If you get any error that suggests a required input file has not been found, you should:

  • Make sure you have set the $ARES environment variable. See the Installation page for instructions.
  • Make sure the required file is where it should be, i.e., nested under $ARES/input.

In the event that a required file is missing, something has gone wrong. Run python remote.py fresh to download new copies of all files.

LinAlgError: singular matrix

This is known to occur in ares.physics.Hydrogen when using scipy.interpolate.interp1d to compute the collisional coupling coefficients for spin-exchange. It is due to a bug in LAPACK version 3.4.2 (see this thread). One solution is to install a newer version of LAPACK. Alternatively, you could use linear interpolation, instead of a spline, by passing interp_cc='linear' as a keyword argument to whatever class you’re instantiating, or more permanently by adding interp_cc='linear' to your custom defaults file (see Parameters section for instructions).

21-cm Extrema-Finding Not Working

If the derivative of the signal is noisy (due to numerical artifacts, for example) then the extrema-finding can fail. If you can visually see three extrema in the global 21-cm signal but they are either absent or crazy in ares.simulations.Global21cm.turning_points, then this might be going on. Try setting the smooth_derivative parameter to a value of 0.1 or 0.2. This parameter will smooth the derivative with a boxcar of width \(\Delta z=\) smooth_derivative before performing the extrema finding. Let me know if this happens (and under what circumstances), as it would be better to eliminate numerical artifacts than to smooth them out after the fact.

AttributeError: No attribute blobs.

This is a bit of a red herring. If you’re running an MCMC fit and saving 2-D blobs, which always require you to pass the name of the function, this error occurs if you supply a function that does not exist. Check for typos and/or that the function exists where it should.