- See all classes
- See documentation for Kernel (core class)
- See documentation for KernelList (collection of Kernels)
- See documentation for Utils (convenience methods)
Scripting the Console: basic methods
Running from command line:
java -jar Console.jar script.conscript [arg1 arg2 arg3...]
Running from GUI:
- Place script in the scripts/ directory. Optionally, add a line at the top of the file prefixed by //#; this will be the title of the menu item assigned to the script
- The script will appear in the Scripts menu. To rescan the scripts directory, use the “Reload scripts” menu item.
Constants
Orbital elements are stored in double[][] tables of size (nplanets, OESIZE), where OESIZE is a constant representing the number of orbital elements used in the current version of the Console (subject to change in the future).
Each row stores the orbital elements for each planet, and each column represents an element, accessed using one of these predefined numerical constants:
PER, MASS, MA, ECC, LOP, INC, NODE
I/O
I/O can be done with the usual Java I/O classes, or one of these convenience methods:
Screen interaction
output.print(string) output.println(string) output.format(format, new Object[] {var1, var2, var3...})
output.pause(prompt) res = output.yesno(prompt) res = output.input(prompt, default)
Loading/saving data/fits
- k.loadData – Loads data specified in a .sys file (star mass, RV data, transits, etc.)
- k.loadFit/saveFit – Loads (saves) a fit and associated data
- k.restore/save – Saves the entire current state of the Kernel into a file (binary or XML)
- k.clone – Returns a copy of the k object, which is independent of the original
RV
- k.addRVDataSet/removeRVDataSet/clearRVDataSets – Adds (removes, clears) a RV dataset
- k.setVoffs/k.getVoffs – Sets (returns) the velocity offsets of the RVs, in the order in which they were loaded
- k.getPowerSpectrum/getSamplingSpectrum – Returns a table representing the periodogram (with period, power and FAP for each row) of the specified data set
- k.extendCompiledDataSet – Extends the compiled RV dataset forward in time
Transits
Planets
- k.setElements / k.getElements – Sets (returns) the currently loaded orbital elements
- k.addPlanet – Adds a new planet
Integration
- k.setIntMethod / k.getIntMethod – Sets (gets) the integration method (0 = Keplerian, 6 = Hermite, 7 = Bulirsch-Stoer)
- k.advance – Integrates a system forward in time
Fitting
- k.minimizes – Searches for the best fit using one of Levenberg-Marquardt, Simplex or Simulated Annealing.
- k.calculate – Calculates parameters of the current fit (Chi^2, RMS, Jitter, residuals).
- k.getRVResiduals – Returns the residuals of the current fit.
- k.getChiSqr / k.getRMS / k.getJitter – Returns the Chi^2/RMS/Jitter of the current fit.
Error estimation
- k.errorEst – Estimates uncertainties using bootstrap or MCMC.