11. Class reference

This is a list of modules, classes, and functions available in astroML. For more details, please refer to the user guide or the text book. Examples of the use of astroML can also be found in the code examples, the text book figures and the paper figures.

11.1. Plotting Functions: astroML.plotting

11.1.1. Functions

plotting.hist(x[, bins, range])

Deprecated since version 0.4.

plotting.scatter_contour(x, y[, levels, …])

Scatter plot with contour over dense regions

11.1.2. Classes

plotting.MultiAxes(ndim[, inner_labels, …])

Visualize Multiple-dimensional data

11.2. Density Estimation & Histograms: astroML.density_estimation

11.2.1. Histogram Tools

density_estimation.histogram(a[, bins, range])

Deprecated since version 0.4.

density_estimation.bayesian_blocks(t[, x, …])

Deprecated since version 0.4.

density_estimation.knuth_bin_width(data[, …])

Deprecated since version 0.4.

density_estimation.scotts_bin_width(data[, …])

Deprecated since version 0.4.

density_estimation.freedman_bin_width(data)

Deprecated since version 0.4.

11.2.2. Density Estimation

density_estimation.XDGMM(n_components[, …])

Extreme Deconvolution

density_estimation.KNeighborsDensity([…])

K-neighbors density estimation

density_estimation.EmpiricalDistribution(data)

Empirically learn a distribution from one-dimensional data

density_estimation.FunctionDistribution(…)

Generate random variables distributed according to an arbitrary function

11.3. Linear Regression & Fitting: astroML.linear_model

11.3.1. Linear Regression

linear_model.LinearRegression([…])

Simple Linear Regression with errors in y

linear_model.PolynomialRegression([degree, …])

Polynomial Regression with errors in y

linear_model.BasisFunctionRegression([…])

Basis Function with errors in y

linear_model.NadarayaWatson([kernel, h])

Nadaraya-Watson Kernel Regression

11.3.2. Functions

linear_model.TLS_logL(v, X, dX)

Compute the total least squares log-likelihood

11.4. Loading of Datasets: astroML.datasets

11.4.1. Astronomy Datasets

datasets.fetch_sdss_spectrum(plate, mjd, fiber)

Fetch an SDSS spectrum from the Data Archive Server

datasets.fetch_sdss_corrected_spectra([…])

Loader for Iterative PCA pre-processed galaxy spectra

datasets.fetch_sdss_S82standards([…])

Loader for SDSS stripe82 standard star catalog

datasets.fetch_dr7_quasar([data_home, …])

Loader for SDSS DR7 quasar catalog

datasets.fetch_moving_objects([data_home, …])

Loader for SDSS moving objects datasets

datasets.fetch_sdss_galaxy_colors([…])

Loader for SDSS galaxy colors.

datasets.fetch_nasa_atlas([data_home, …])

Loader for NASA galaxy atlas data

datasets.fetch_sdss_sspp([data_home, …])

Loader for SDSS SEGUE Stellar Parameter Pipeline data

datasets.fetch_sdss_specgals([data_home, …])

Loader for SDSS Galaxies with spectral information

datasets.fetch_great_wall([data_home, …])

Get the 2D SDSS “Great Wall” distribution, following Cowan et al 2008

datasets.fetch_imaging_sample([data_home, …])

Loader for SDSS Imaging sample data

datasets.fetch_wmap_temperatures([masked, …])

Loader for WMAP temperature map data

datasets.fetch_rrlyrae_mags([data_home, …])

Loader for RR-Lyrae data

datasets.fetch_rrlyrae_combined([data_home, …])

Loader for RR-Lyrae combined data

datasets.fetch_LINEAR_sample([data_home, …])

Loader for LINEAR data sample

datasets.fetch_LINEAR_geneva([data_home, …])

Loader for LINEAR geneva data.

datasets.fetch_LIGO_bigdog([data_home, …])

Loader for LIGO bigdog event

datasets.fetch_LIGO_large([data_home, …])

Loader for LIGO large dataset

datasets.fetch_hogg2010test([structured])

Fetch the Hogg et al 2010 test data

datasets.fetch_rrlyrae_templates([…])

Loader for RR-Lyrae template data

datasets.fetch_sdss_filter(fname[, …])

Loader for SDSS Filter profiles

datasets.fetch_vega_spectrum([data_home, …])

Loader for Vega reference spectrum

datasets.generate_mu_z([size, z0, dmu_0, …])

Generate a dataset of distance modulus vs redshift.

11.5. Time Series Analysis: astroML.time_series

11.5.1. Periodic Time Series

time_series.lomb_scargle(t, y, dy, omega[, …])

Deprecated since version 0.4.

time_series.lomb_scargle_bootstrap(t, y, dy, …)

Deprecated since version 0.4.

time_series.multiterm_periodogram(t, y, dy, …)

Deprecated since version 0.4.

time_series.search_frequencies(t, y, dy[, …])

Utility Routine to find the best frequencies

time_series.MultiTermFit(omega, n_terms)

Multi-term Fourier fit to a light curve

11.5.2. Aperiodic Time Series

time_series.ACF_scargle(t, y, dy[, n_omega, …])

Compute the Auto-correlation function via Scargle’s method

time_series.ACF_EK(t, y, dy[, bins])

Auto-correlation function via the Edelson-Krolik method

time_series.generate_power_law(N, dt, beta)

Generate a power-law light curve

time_series.generate_damped_RW(t_rest[, …])

Generate a damped random walk light curve

11.6. Statistical Functions: astroML.stats

stats.binned_statistic(x, values[, …])

Compute a binned statistic for a set of data.

stats.binned_statistic_2d(x, y, values[, …])

Compute a bidimensional binned statistic for a set of data.

stats.binned_statistic_dd(sample, values[, …])

Compute a multidimensional binned statistic for a set of data.

stats.sigmaG(a[, axis, overwrite_input, …])

Compute the rank-based estimate of the standard deviation

stats.median_sigmaG(a[, axis, …])

Compute median and rank-based estimate of the standard deviation

stats.mean_sigma(a[, axis, dtype, ddof, …])

Compute mean and standard deviation for an array

stats.fit_bivariate_normal(x, y[, robust])

Fit bivariate normal parameters to a 2D distribution of points

stats.bivariate_normal([mu, sigma_1, …])

Sample points from a 2D normal distribution

stats.trunc_exp

A truncated positive exponential continuous random variable.

stats.linear

A truncated positive exponential continuous random variable.

11.7. Dimensionality Reduction: astroML.dimensionality

dimensionality.iterative_pca(X, M[, n_ev, …])

Parameters

11.8. Correlation Functions: astroML.correlation

Tools for computing two-point correlation functions.

correlation.two_point(data, bins[, method, …])

Two-point correlation function

correlation.two_point_angular(ra, dec, bins)

Angular two-point correlation function

correlation.bootstrap_two_point(data, bins)

Bootstrapped two-point correlation function

correlation.bootstrap_two_point_angular(ra, …)

Angular two-point correlation function

11.9. Filters: astroML.filters

filters.savitzky_golay(y, window_size, order)

Smooth (and optionally differentiate) data with a Savitzky-Golay filter

filters.wiener_filter(t, h[, signal, noise, …])

Compute a Wiener-filtered time-series

filters.min_component_filter(x, y, feature_mask)

Minimum component filtering

11.10. Fourier and Wavelet Transforms: astroML.fourier

fourier.FT_continuous(t, h[, axis, method])

Approximate a continuous 1D Fourier Transform with sampled data.

fourier.IFT_continuous(f, H[, axis, method])

Approximate a continuous 1D Inverse Fourier Transform with sampled data.

fourier.PSD_continuous(t, h[, axis, method])

Approximate a continuous 1D Power Spectral Density of sampled data.

fourier.wavelet_PSD(t, h, f0[, Q])

Compute the wavelet PSD as a function of f0 and t

fourier.sinegauss(t, t0, f0, Q)

Sine-gaussian wavelet

fourier.sinegauss_FT(f, t0, f0, Q)

Fourier transform of the sine-gaussian wavelet.

fourier.sinegauss_PSD(f, t0, f0, Q)

Compute the PSD of the sine-gaussian function at frequency f

11.11. Luminosity Functions: astroML.lumfunc

lumfunc.Cminus(x, y, xmax, ymax)

Lynden-Bell’s C-minus method

lumfunc.binned_Cminus(x, y, xmax, ymax, …)

Compute the binned distributions using the Cminus method

lumfunc.bootstrap_Cminus(x, y, xmax, ymax, …)

Compute the binned distributions using the Cminus method, with bootstrapped estimates of the errors

11.12. Classification: astroML.classification

classification.GMMBayes([n_components])

GaussianMixture Bayes Classifier

11.13. Resampling: astroML.resample

resample.bootstrap(data, n_bootstraps, …)

Compute bootstraped statistics of a dataset.

resample.jackknife(data, user_statistic[, …])

Compute first-order jackknife statistics of the data.