Department of Physics AstroLab

Brief Notes on Nightfall

Nightfall is an astronomy application for eclipsing binary systems. It can produce animations of the binary stars, calculate synthetic lightcurves (as well as radial velocity curves), and, most usefully for the Astrolab projects, can calculate the best-fit model of a binary star system for a given set of observational data.

The homepage can be found at Rainer Wichmann's Nightfall web site, although the more useful user guide is stored locally at /nightfall-x.xx/UserManual.html (or /nightfall-x.xx/UserManual.pdf) on the astrolab computers. Type into a terminal:

firefox /home/astrolab/nightfall-x.xx/UserManual.html &

Copies of the user's manual are also available on-line ( html, pdf ).

Another useful resource on the general processes involve in calculating the best-fit model of a binary star system can be found in this PDF file (local copy).


The interactive interface for Nightfall is started by typing the following into a terminal (noting the capital 'U')

nightfall -U
All features in the program can be used purely from command lines - type nightfall into a terminal for a list of accepted commands. This is tricky without a thorough inspection of the documents, and also give a less satisfactory overview of the process.

Nightfall can open two different files. A data (.dat) file contains observational data for a single system in one photometric band, such as you will obtain from the analysis of your images. The format of this file can be found in section 7 of the user manual. Nightfall comes with a selection of data files with model 'observational' data, which can also be inspected to obtain the format. The second file type is the configuration (.cfg) file, which contains the values of the fitting parameters for a particular system. Configuration files for the same systems as the model .dat files are provided, and can be used to get a feel for the program. In your analysis, the configuration file is the output of the parameter fitting process.

To fit binary star system parameters to a lightcurve, Nightfall requires only the period (which can be found with the bforce routine). However, 'back-of-the-envelope' calculations can be used to give a rough estimate for most of the parameters - remember, the most successful fits are obtained from a good starting point.

Fitted (ie variable) parameters are shown by a drepressed name button, while those parameters kept fixed during the fitting are shown as protruding. Parameters can be toggled between fixed and variable by clicking on the buttons next to the input fields. Fitting is initiated using the FIT with tolerance button from the Data Fitting tab. A system name is not required (although useful in the output file), but as stated above, an accurate period is needed. The Mass and Separation fields in the Data Fitting tab should be estimated and the buttons depressed. Other useful parameters such as Mass Ratio and primary/secondary (P/S) Temperatures can be found under the Basic tab.

Once initiated, fitting in Nightfall progresses though a number of iterations, showing a plot of the resulting model lightcurve after each. Fitting to too few parameters will result in a poor fit, while fitting to too many parameters, or from a poorly chosen starting point, can result in a spuriously low chi square value (and incorrect values) due to too many degrees of freedom. The chi squared value is displayed for each iteration at the bottom of the Nightfall window.

The best plan of action is something like:

  • Calculate the period and enter it in the Period field in the Data Fitting tab
  • Make rough estimates of each parameter: certainly Mass, Separation, Mass Ratio, the Temperatures, and any others you can estimate (for instance start with inclination at 90 deg)
  • Keep most parameters constant, fitting to only a few basic parameters (such as Mass and Separation)
  • Once these have converged on reasonable values, other parameters can be added to the fit in turn, gradually tuning up the model. It is advised to leave the original variables in the fit, as adding a new parameter (for example eccentricity on the advanced tab) can potentially have a fairly large effect on perdictions for others.

NOTE: Fitting with the MAP ChiSquared with steps (especially with simulated annealing activated) can take a long time to find a solution and is therefore not recommended.


Installing Nightfall on Fedora 12:

Nightfall requires the GTK-2.0-devel package, which is not part of the default installation. To rectify this (while an admin user):

  • yum update to make sure the most recent GTK-2.0 and gnuplot packages are installed
  • yum install gtk2-devel to install the required GTK2-devel package
The standard Nightfall installation procedure (as documented at Rainer Wichmann's Nightfall web site) can now be followed:
  • tar -xvzf nightfall-x.xx.tar.gz
  • cd nightfall-x.xx/
  • ./configure --with-pgplot-include=/star/include --with-pgplot-lib=/star/lib
  • make
  • make install


Back to the AstroLab Home Page jrl 2013-Dec-22 23:33:44 UTC