Eran Ofek home|MATLAB astronomy home
    

List of functions in the astronomy and astrophysics package for MATLAB




The functions and data files are updated every several weeks.


Table of content: The following table contains a list of all the available functions. A list of all the available catalogs and data files can be found in the data files page. The table is sortable by any of the columns, by clicking on the column.

Note that the "Reliability" column indicates the amount of debugging and tests a program was went through (1 is better). If you encounter any bugs please report to: eran dot ofek at weizmann dot ac dot il.



Whats new? To figure out what new, sort the table by the "Last version" column.


Last update: 29-Dec-2015



Total number of functions: 871



Number of functions added/updated in the last two months: 20
FunctionPackageOriginalLast versionReliabilityDescription
amapproj.mAstroMapAug 199925-Aug-20132 Plot a list of coordinates (as dots/lines) on a map with a chosen projection.
plot_monthly_smap.mAstroMapNovember 200424-Aug-20141 Plot a monthly sky map with a naked eye stars for a given time and observer Geodetic position. Optionaly mark planets position, constellations and the milky way.
plot_smap.mAstroMapMar 200417-Jan-20132 Given a star catalog plot star map with optional magnitude/color/type/proper motion ('/cy).
pr_aitoff.mAstroMap 09-Jul-20141 Project coordinates (longitude and latitude) using equal area Aitoff projection.
pr_albers.mAstroMap July 199925-Aug-20122 Project coordinates (longitude and latitude) using the Albers Equal-Area projection. The coordinates are projected on ellipse with axis ratio of 2:1.
pr_azimuthal_equidist.mAstroMap August 200625-Aug-20121 Project longitude and latitude using Azimuthal equidistant projection (constant radial scale).
pr_bonne.mAstroMap 25-Aug-20122 Project coordinates (longitude and latitude) using the Bonne projection.
pr_cassini.mAstroMapJul 199909-Jul-20142 Project coordinates (longitude and latitude) using the Cassini projection.
pr_conic.mAstroMap 09-Jul-20142 Project coordinates (longitude and latitude) using the Conic projection.
pr_cylindrical.mAstroMapJuly 199925-Aug-20122 Project coordinates (longitude and latitude) using a general cylindrical projection.
pr_gnomonic.mAstroMapJuly 199913-Sep-20122 Project coordinates (longitude and latitude) using the Gnomonic non conformal projection This is a nonconformal projection from a sphere center in which orthodromes are stright lines.
pr_hammer.mAstroMap 25-Aug-20121 Project coordinates (longitude and latitude) using the Hammer projection. The coordinates are projected on an ellipse with axis ratio of 2:1.
pr_hammer_aitoff.mAstroMap 13-Sep-20121 Project coordinates (longitude and latitude) using equal area Hammer-Aitoff projection used in the FITS/WCS standard.
pr_ignomonic.mAstroMapJune 200513-Sep-20122 Project coordinates (X and Y) using the inverse Gnomonic non conformal projection,
pr_ihammer_aitoff.mAstroMap 12-Sep-20121 Project coordinates (longitude and latitude) using the inverse of the equal area Hammer-Aitoff projection used in the FITS/WCS standard.
pr_mercator.mAstroMapJuly 199925-Aug-20122 Project coordinates (longitude and latitude) using the Mercator projection.
pr_mollweide.mAstroMap 25-Aug-20121 Project coordinates (longitude and latitude) using the equal area Mollweide projection.
pr_parabolic.mAstroMapJuly 199925-Aug-20122 Project coordinates (longitude and latitude) using the Parabolic projection.
pr_planis.mAstroMapAugust 200625-Aug-20121 Project longitude and latitude using a 'planisphere projection'.
pr_polar.mAstroMap 25-Aug-20122 Project coordinates (longitude and latitude) using the polar projection (from north pole).
pr_sinusoidal.mAstroMap25-Aug-20122 Project coordinates (longitude and latitude) using the Sinusoidal projection.
pr_stereographic.mAstroMap25-Aug-20122 Project coordinates (longitude and latitude) using the Stereographic projection. This is a map projection in which great circles and Loxodromes are logarithmic spirals.
pr_stereographic_polar.mAstroMap25-Aug-20122 Project coordinates (longitude and latitude) using the Stereographic polar projection. This projection preservs angles.
pr_xy.mAstroMap 25-Aug-20122 Project coordinates (longitude and latitude) to X-Y projection (no transformation).
prep_dss_fc.mAstroMapJul 200518-Jan-20132 Prepare DSS finding charts, with labels, compass, and slits.
projectcoo.mAstroMapJuly 199925-Aug-20122 Project coordinates from longitude and latitude to X/Y using a specified projection.
spherical_tri_area.mAstroMapDecember 200825-Aug-20122 Given three coordinates on a sphere, calculate the area of a spherical triangle defined by these three points.
usnob1_map.mAstroMap March 200425-Aug-20122 Plot a finding chart using a local copy of the USNO-B2.0 catalog. The user can select between b/w stars or color stars (with their O-E color index color coded). If O-E is not available then stars are plotted in black. The user can overplot known galaxies from the PGC catalog. In the color option the edge of probable stellar objects is marked by black circle. The user can overplot known bright stars (VT<11) for which spikes and saturation artifact can be seen.
accretion_disk.mAstroSpecJul 200524-Jan-20132 Calculate the theoretical spectrum of a optically thick, thin accretion disk given the mass of the central object, disk radius, and the accretion rate.
accretion_disk_mag_c.mAstroSpec Feb 200725-Aug-20122 Calculate the magnitude, in a given filter, of a optically-thick thin accretion disk model.
add_specphot_stand.mAstroSpecSep 201204-Mar-20142 Add a spectrophotometric standard to list of standard stars.
band_spectrum.mAstroSpec Feb 200625-Aug-20122 Calculate an un-normalized Band-spectrum (Band et al. 1993).
black_body.mAstroSpecJan 200301-Dec-20141 Calculate a black-body spectrum given its temperature.
blackbody_bolmag.mAstroSpec Feb 200727-Aug-20121 Calculate the bolometric magnitude of a black body spectrum, given its temperature, radius and distance.
blackbody_flux.mAstroSpec Feb 200725-Aug-20122 Calculate the flux, in a given wavelength range, of a black-body, given its temperature, radius and distance.
blackbody_mag_c.mAstroSpecFeb 200701-Dec-20141 Calculate the magnitude, in a given filter, of a black-body, given its temperature, radius and distance.
brightness_temp.mAstroSpecNov 200729-Dec-20141 Calculate the brightness temperature.
calibrate_spec_using_phot.mAstroSpec July 201310-Nov-20152 Given a spectrum and a light curve in one or more bands, applay synthetic photometry to the spectrum to calibrate it against the light curves. Optionally, if RA, Dec are provided, dereddned the spectrum for Galactic extinction. Furthermore, if redshift is provided then the spectrum will be converted to the rest frame, and if additional host extinction is given then another deredenning at the rest frame wavelength will be applied. If more than one filter is provided than the spectrum calibration will be performed using a polynomial fitting when the deg of the polynom is N-1, where N is the good filters.
ccf_spectra.mAstroSpecAug 200112-Jul-20141 Cross-Correlate two spectra. For each redshift, the correlation is calculated by applying a redshift to the second spectrum (Template), and correlate it with the first spectrum.
chi2_spectra.mAstroSpec Oct 200915-Oct-20142 Perform a chi^2 fitting between a spectrum and a template spectrum as a function of redshift.
conv1_gaussian.mAstroSpecJan 201323-Jan-20132 Convolve a 1-D signal with a Gaussian kernel.
convert_flux.mAstroSpecMarch 201101-Apr-20142 Convert between different flux units
eq_temp.mAstroSpecOct 201312-Jul-20142 Calculate the eqilibrium temperature of a body illuminated by a black-body radiation.
extinction.mAstroSpecFeb 200112-Jul-20141 Given the E_{B-V} and the wavelength or filter name calculate the extinction in magnitude. The program works in the 0.1-2 micron range. The program is using the Cardelli, Clayton, Mathis (1989) model. See also old version: optical_extinction.m.
find_shift_scale_spec.mAstroSpecJul 200512-Jul-20142 Given a spectrum and a reference spectrum [Wavelength, Flux] find the shift (a constant added to the data) and/or a scaling (multiply the data by a constant) that relats the data and the reference by minimizing the rms. Note that the shift is applaied first. Alternatively, the program can find a factor as function of wavelength that such: Ref*Factor = Spec. This is done by fitting a polynomial to the log of the ratio between the spectra and reference.
fit_blackbody.mAstroSpecFeb 201012-Jul-20142 Fit set of magnitudes to a black-body spectrum, and derive its best fit parameters.
fit_blackbody_spec.mAstroSpec 02-Oct-20142 Fit a spectrum to a black-body spectra.
fit_bolometric_flux.mAstroSpecDec 201305-Nov-20152 Estimate the Total bolometric flux according to given magnitudes of different filters.
fit_extinction.mAstroSpecJul 200730-Oct-20122 Given a spectrum and a template, find the best extinction curve that should be applied to the spectrum in order to best fit the template.
fit_photoz.mAstroSpecFeb 200730-Oct-20122 Photometric redshift \chi^2 estimator. Given a photometric measurment of a source and a spectrum, calculate the \chi^2 fit between the spectrum as a function of redshift and the photometric measurements.
fit_specline.mAstroSpecJul 201220-Feb-20142
fun_gauss.mAstroSpecApr 201329-May-20152 Calculating a Gaussian function of the form: Y = Amplitude*exp( (X-W0)^2/(2*Sigma^2) ) Optionaly, convolve the the result with a Gaussian. This function can be used by fitting functions like nlinfit_my.m and fit_specline.m
fun_lorentzian.mAstroSpecApr 201330-Apr-20132 Calculating a Lorentzian function of the form: Y = D.*Gamma./(pi.*( (X-X0).^2 + Gamma.^2 )) Optionaly, convolve the the result with a Gaussian. This function can be used by fitting functions like nlinfit_my.m and fit_specline.m
get_filter.mAstroSpec Jan 200602-Oct-20141 Search and get astronomical Filter information and transmission curve.
get_gaia_synspec.mAstroSpecNov 200816-Oct-20142 get a synthetic stellar spectrum from the local GAIA spectral library. Spectra are in the range 2500-10500A and 1A resolution. Assuming alpha enhanement 0, and micro-turbulence 2km/s.
get_lines.mAstroSpec May 200625-Aug-20122 Search spectral lines by wavelength. (for search by name see: get_lines1.m) The list of lines contains 46663 spectral lines (Reader et al. 1980; 1981) for 99 atomic species. Neutral through quadruply ionized atoms are tabulated.
get_lines1.mAstroSpecJuly 200525-Aug-20121 Search for a spectral line, by name or by eavelength, among a list of selected spectral lines.
get_spectra.mAstroSpecJul 200527-Dec-20152 Get a template spectrum from spectra library, or alternatively a use supplied spectrum. Optionally, apply redshift, extinction, atmospheric extinction, and Telluric absorptions.
hydrogen_lines.mAstroSpec Feb 200825-Aug-20121 Calculate the vacum wavelength of Hydrogen lines, given their shell numbers.
interp_mag.mAstroSpecJul 200611-Nov-20151 Given magnitude of an object find the best fit spectra (from a library of templates), and calculate the magnitude of the spectra in additional bands.
ionization_potential.mAstroSpecSep 201212-Jul-20142 Returm the ionization potential for a given element and ionization level.
kcorr.mAstroSpecApr 201312-Jul-20142 Calculate k-correction. Given a spectrum two filters, and their redshifts calculate the k-correction of the first filter minus the second filter. This is calculated by shifting the spectrum to z1, measuring the synthetic magnitude in the first filter, then shiting to z2 and measuring the synthetic magnitude in the second filter.
luptitude.mAstroSpecJul 201212-Jul-20142 Convert flux to luptitudes (asinh magnitudes).
matchspec.mAstroSpecJul 200510-Sep-20152 A GUI utility to inspect and match spectrum with templates.
optical_extinction.mAstroSpec Feb 200122-Oct-20121 Given the E_{\lambda_1-\lambda_2} (e.g., E_{B-V}) calculate the extinction in magnitude A_{\lambda_3}. The program works in the 0.1-2 micron range. The program is using the Cardelli, Clayton, Mathis (1989) or Allen models. \lambad can be specified using filters names: Johnson: 'U','B','V','R','I','J','H','K' POSS : 'O','E' SDSS : 'u','g','r','i','z'
scale_spectrum.mAstroSpecJul 200512-Jul-20141 Scale spectrum by shift and stretch or a wavelength dependent factor (See also: find_shift_scale_spec.m).
search_specphot_stand.mAstroSpecApr 201305-Mar-20142 Search a spectroscopic standard star, by coordinates or by name in the SpecPhot_Stand.mat structure. The search by name option is case insensitive and blanks insensitive. Moreover, the name search can be either exact or by substring.
shift2vel.mAstroSpec 12-Jul-20141 Calculate the velocity from the red/blue shift (z).
shift_spec.mAstroSpec 12-Jul-20142 Transform a spectrum from the observed frame to the rest frame. If the redshift is negative then transform from the rest frame to the observed frame.
sky_ebv.mAstroSpecMay 200612-Jul-20142 Calculate the extinction from a local copy of the Schlegel, Finkbeiner & Davis (1998) extinction maps.
spec_photon_counts.mAstroSpecNov 200712-Nov-20142 Given a spectrum and the effective area of an instrument as a function of wavelength, calculate the the total recieved flux and the photons count rate in the instrument.
star_sptype_color.mAstroSpecOct 201212-Jul-20142 Given a star spectral type and luminosity class, get the star color between any two filters.
synphot.mAstroSpecMay 200805-Oct-20141 Calculate synthetic photometry of a spectrum.
vel2shift.mAstroSpec 12-Jul-20141 Calculate the red/blue shift (z) from velocity.
wein.mAstroSpecFeb 200712-Jul-20141 Apply Wein law - return the peak wavelength of a black body at a given temperature.
wget_gaia_synspec.mAstroSpecNov 200816-Oct-20142 wget a synthetic stellar spectrum from the GAIA spectral library, in the range 2500-10500A and 1A resolution. Assuming alpha enhanement 0, and micro-turbulence 2km/s.
xray_abs.mAstroSpecNov 200712-Jul-20142 Given the neutral Hydrogen column density, calculate the bound-free attenuation of X-rays as a function of wavelength in the ISM. The program assumes abundences from Ebihara (1982). Absorption is due to neutral species only. Adopted from Zombeck (1990).
zodiac_spectrum.mAstroSpecNov 201403-Dec-20141 Return the zodiac spectrum as adopted from the HST STIS handbook. The high zodiacal ligh is defined where V=22.1 mag/arcsec^-2.
bc_a.mAstroStat October 200225-Aug-20121 Bias correction and acceleration for bootstrap and Jackknife estimetors of the confidence interval. The bc_a bias coorection and acceleration can be used to estimate the bias corrected and accelerated confiedence interval (CI).
bootstrap_std.mAstroStatOct 200215-Sep-20141 Given an estimator (given by a function) calculate the Bootstrap StD for this estimator.
cel_coo_rnd.mAstroStatNovember 200526-Aug-20122 Generate random coordinates on the celestial sphere. The program can applay matrix rotation, reject coordinates, and generate non uniform coordinates. [preliminary version].
confint_probdist.mAstroStatOct 200117-Jan-20132 Calculate two-sided confidence interval of a given numerical probability distribution function.
corrsim.mAstroStat March 201129-Sep-20131 Calculate the correlation between two vectors and use the bootstrap method to estimate the probability to get a correlation larger than the observed correlation. The function ignores NaN values.
corrsim_cov.mAstroStat March 201103-Jun-20131 Given a matrix with N columns, calculate the correlation between each pair of columns and use the bootstrap method to estimate the probability to get a correlation larger than the observed correlation. The function ignores NaN values.
err_cl.mAstroStatNovember 199925-Aug-20121 Given a vector of data points, calculate the lower and upper bounds of an interval that contains a given precentage (P) of the data. (1-P)/2 of the data points are below and above the lower and upper bounds, respectively. Remove NaNs prior to calculation.
error2ensemble.mAstroStatMay 199812-Jul-20142 Generate a realization of data points given the data probability distribution function.
hist2d.mAstroStatFeb 201302-Jan-20142 calculate the 2-D histogram of 2-D data set.
jackknife.mAstroStat September 200220-Jan-20131 Given an estimator (given by a function), calculate the Jackknife StD and the first order Quenouille-Tukey Jacknife bias for this estimator. Notes: - the estimator should be continues. - if Bias/StD~<0.25 then the bias is probably not an issue. - The bias estimate is not reliable if the estimator is an unsmooth statistic (e.g., median).
max_likelihood.mAstroStatSeptember 200125-Aug-20122 Given a numerical probability distribution and list of 'events', calculate the 'likelihood' for the events given the probability distribution. In addition, calculate the ML ratio test and preform Monte-Carlo simulations by generating realizations of events given the probability distribution and calculate the likelihood-probability distribution.
maxnd.mAstroStatJuly 200525-Aug-20121 Return the global maximum of a N-D matrix and its indices. This is equivalent to max(Data(:)), but it also returns the indices of the global maximum.
mean_error.mAstroStatJan 201501-Jan-20152 Calculate the error on the mean using std/sqrt(N).
meannd.mAstroStatJuly 200525-Aug-20121 Return the global mean of a N-D matrix.
mediannd.mAstroStatJuly 200525-Aug-20121 Return the global median of a N-D matrix.
minnd.mAstroStat Feb 200525-Aug-20121 Return the global minimum of a N-D matrix and its indices. This is equivalent to min(Data(:)), but it also returns the indices of the global minimum.
mode_fit.mAstroStatApr 201520-Oct-20152 Estimate the mode of an array by fitting a Gaussian to the histogram of the array around its median. Return also the Sigma of the Gaussian fit.
moment_2d.mAstroStatJun 200514-Jan-20132 Calculate first and second moments of a 2D matrix.
nanrstd.mAstroStatMar 201410-Mar-20142 Robust nanstd. Estimating the std (like nanstd.m), based on the 50-percentile of the distribution.
noiser.mAstroStatJan 201424-Jan-20142 Add multiple noise components to a vector.
poissconf.mAstroStatDec 200109-Jul-20142 Given the number of observed events, calculates the two sided upper and lower confidence intervals, assuming Poisson statistics. Below N=140 use the Gehrels (1986) algorithm. Above this, use sqrt(N) approximation.
prob2find_inr.mAstroStatFeb 200419-Jan-20131 Given a density (number per unit area), and a distance from a point, calculate the the probability to find an object within radius R from the point (assuming Poisson statistics).
psigma.mAstroStatMar 200912-Jul-20141 Return the two sided or one sided probability for a given sigma level.
rand_circle.mAstroStatFeb 200113-Jan-20152 Generate random number equally distributed inside a unit circle.
rand_ps.mAstroStatNov 200221-Sep-20152 Generate a random realization of a time series with a given power spectrum (e.g., power-law) and optional gaussian measuments errors.
rand_range.mAstroStatOct 200817-Jan-20132 Generate uniformly random number in a given range. The numbers can be uniform either in linear space or log10 space.
randgen.mAstroStatJune 200025-Aug-20121 Random numbers generator for arbitrary function given by a numerical distribution.
randinpolygon.mAstroStatAugust 200425-Aug-20122 Generate random positions inside a polygon, defined on a plane or a sphere.
rangend.mAstroStatJuly 200526-Aug-20121 Return the global Range of a N-D matrix.
realhist.mAstroStat September 199527-Aug-20122 Calculate histogram for a dataset in a given range.
stdnd.mAstroStatJuly 200525-Aug-20121 Return the global StD of a N-D matrix.
sumnd.mAstroStat March 200726-Aug-20121 Return the global sum of a N-D matrix.
symerror.mAstroStatAug 200411-Feb-20132 Given a symbolic expression and the variables in the expression, calculate the symbolic error function of the expression, with respect to the variables. The output error expression contains an error variable named D_"original_var" for each variable in the input expression.
symerror_calc.mAstroStatMar 200718-Jan-20132 Given a symbolic expression, the names of the variables in the expression and the value of the variables and errors, calculate the symbolic error function and evaluate it.
wmean.mAstroStatJune 199807-Mar-20132 Calculated the weighted mean of a sample (ignoring NaNs).
xcorr2p.mAstroStatNovember 200525-Aug-20122 Given two lists of coordinates (selected in the same region), calculate the cross correlation function as a function of distance. The cross-correlation can be calculated using the DR, RR or DR2 methods.
astrolinks.mCatalogue October 200607-Feb-20152 Given a list of coordinates, return the URL links to the following webpages: SDSS chart, SDSS object, NED, FIRST, NVSS, and DSS. Moreover, generate an html page with the catalog data and links to the verious web pages.
build_htm4cat.mCatalogueFeb 201522-Feb-20152 Given an astronomical catalog (in a structure format, e.g., 'FIRST.mat') construct a directory containing catalogs per HTM (Hierarchical Triangular Mesh) region, and an index catalog of all HTM regions.
cat_match.mCatalogueSep 200909-Dec-20142 Match two catalogs by object positions. If the catalogs are not sorted then the program will sort them.
cat_search.mCatalogue Feb 200403-Feb-20131 Search a sorted astronomical catalog for all objects found within a given distance from the search position.
get_adata.mCatalogue April 200725-Aug-20122 Get 'everything' for a given celestial poistion.
get_apass.mCatalogueFeb 201516-Feb-20152 Search the APASS (AAVOS photometric all sky survey) catalog around a given coordinate.
get_batse_lc.mCatalogueFeb. 200427-Aug-20122 Get a 4 chanel BATSE light curve in 64ms bins (only PREB sample) from a local catalog.
get_cat.mCatalogueFeb 201524-Apr-20152 Search an astronomical catalog structure by coordinates.
get_dss.mCatalogueJuly 200527-Aug-20121 Get link to and the FITS image of a digital sky survey image (POSS-I/II, UKST survey). Read the FITS file into matlab.
get_first.mCatalogueFeb 201516-Feb-20152 Search the FIRST (21 cm radio survey) catalog around a given coordinate.
get_hstsrc.mCatalogueMar 201516-Mar-20152 Search a retrieve the HST source catalog around given coordinate.
get_nvss.mCatalogueFeb 201516-Feb-20152 Search the NVSS (21 cm radio survey) catalog around a given coordinate.
get_orbit_files.mCatalogueNovember 200927-Dec-20121 Get asteroids and comets orbital elements from JPL and read into a matlab structure.
name_server_ned.mCatalogueJun 201430-Jun-20142 Resolve an astronomical object name into coordinates using NASA Extragalactic Database (NED).
name_server_simbad.mCatalogueJun 201406-Feb-20152 Resolve an astronomical object name into coordinates using SIMBAD database.
search_cat.mCatalogueJan 201516-Apr-20152 Given a catalog with Long,Lat coordinates position, search for lines near a list of reference positions. This function can be used to search for a near(est) position in a catalog or to match two catalogs. This function replaces cat_search.m and cat_match.m
stellar_tracks.mCatalogueFeb 200727-Dec-20122 Given an initial mass and metllicity return the Geneva stellar tracks as a function of time.
tile_the_sky.mCatalogueJul 200518-Nov-20122 Tiling the celestial sphere with approximately equal area tiles.
vizquery_path.mCatalogueFeb 201503-Feb-20151 Return the path of the vizquery/cdsclient directory Edit this program before using wget_2mass.m, wget_usnob1.m and wget_ucac4.m.
wget_2mass.mCatalogueJul 200411-Feb-20152 Query the 2MASS catalog using the VizieR web service. Installation: 1. install cdsclient (instructions can be found in: http://cdsarc.u-strasbg.fr/doc/cdsclient.html) in $USER/matlab/fun/bin/vizquery/cdsclient-3.71/ 2. If you installed the cdsclient in a different location, then edit the first few lines of the code accordingly. This program is replacing search2mass.m
wget_sdss.mCatalogueFeb 201519-May-20152 Query SDSS PhotoPrimary table around specific coordinate. See run_sdss_sql.m for a more general queries.
wget_ucac4.mCatalogueJan 201430-Mar-20152 Query the UCAC4 catalog using the VizieR web service. Installation: 1. install cdsclient (instructions can be found in: http://cdsarc.u-strasbg.fr/doc/cdsclient.html) in $USER/matlab/fun/bin/vizquery/cdsclient-3.71/ 2. If you installed the cdsclient in a different location, then edit the first few lines of the code accordingly.
wget_usnob1.mCatalogueJun 200711-Feb-20152 Query the USNO-B1 catalog using the VizieR web service. Installation: 1. install cdsclient (instructions can be found in: http://cdsarc.u-strasbg.fr/doc/cdsclient.html) in $USER/matlab/fun/bin/vizquery/cdsclient-3.4/ 2. If you installed the cdsclient in a different location, then edit the first few lines of the code accordingly. This program is replacing search2mass.m
ad_dist.mcosmology October 199908-Dec-20131 Calculate the filled beam angular diameter distance between two redshifts along the line of sight.
ad_q_dist.mcosmologyJune 200225-Aug-20122 Compute filled-beam angular-diameter distance to an object in a flat Universe with constant equation of state (p=w\rho; i.e., quintessence).
cdt_dz.mcosmologyJuly 200125-Aug-20121 Calculate the differential cdt/dz in the FLRW geometry.
comoving_dist.mcosmologyJuly 200627-Aug-20122 Calculate the line of sight comoving distance.
comoving_volume.mcosmologyAugust 200627-Aug-20122 Calculate the differential comoving volume (d\Omega dz) at redshift z and the total comoving volume from redshift 0 to z.
cosmo_pars.mcosmology March 200708-Dec-20132 Return the cosmological parameters as measured by various experiments.
crit_surface_density.mcosmologyJuly 200127-Aug-20122 Calculates the critical surface density for gravitational lensing, given the cosmology and redshifts of the lens and source.
delta_vir_z.mcosmology October 200027-Aug-20122 Calculate the virial overdensity \Delta_{vir}, as a function of redshift z, and cosmological paramaeters.
dist_mod2dist.mcosmologyJan 201507-Feb-20152 Convert distance modulous to luminosity distance and redshift.
e_z.mcosmologyJuly 200627-Aug-20122 Calculate E(z) cosmological function, which is proportional to the time derivative of the logarithm of the scale factor.
hubble_z.mcosmologyJuly 200108-Dec-20131 Compute the Hubble parameter as a function of redshift. (Assuming matter dominated universe - Z<1000).
inv_comoving_volume.mcosmologyDec 201327-Dec-20132 Use the cosmological volume to calculate the corresponding redshift.
inv_e_z.mcosmologyJuly 200627-Aug-20122 Calculate 1/E(z) cosmological function, in which E(z) is proportional to the time derivative of the logarithm of the scale factor.
inv_lum_dist.mcosmologyMarch 200816-Oct-20122 Given the distance modulus, use the luminosity distance to calculate the corresponding redshift.
lookback_time.mcosmologyJuly 200125-Aug-20121 Compute the cosmological lookback time, between two events in redshift z1 and z2, and given the cosmology. (Assuming matter dominated universe - Z<1000).
lum_dist.mcosmologyJuly 200105-Apr-20132 Compute luminosity distance from redshift and cosmological parameters. Given the object spectra, calculate also the K-correction.
matter_density.mcosmologyJul 200613-Jul-20142 Calculate the mean matter density in the Universe.
omega_m_lambda_lines.mcosmologyJuly 200124-Jan-20132 Given a universe with \Omega_{m} and \Omega_{\Lambda} contributions, and given \Omega_{m} vector, find for each value of \Omega_{m}: (i) the value of \Omega_{\Lambda} for which the universe will expand forever; (ii) The \Omega_{\Lambda} criterion for which there have been no singularity in the past (rather than Big Bang its early history consisted of a period of gradually slowing contraction to a minimum radius before begining its current expansion).
omega_z.mcosmology 25-Aug-20121 Calculate \Omega_{m} as a function of redshift z.
tran_comoving_dist.mcosmologyJuly 200608-Dec-20132 Calculate the transverse comoving distance. Given the transverse comoving distance (D_M), the comoving distance between two events at the same redshift, but separated on the sky by some angle \delta\theta is: D_M\delta\theta.
ds9.mds9Feb 200713-Jul-20141 Load images (FITS file, image or matlab matrix) into ds9. The user should open ds9 before execution of this function. THIS FUNCTION IS IDENTICAL TO ds_disp.m (a shortcut).
ds9_disp.mds9Feb 200729-Apr-20152 Load images (FITS file, image or matlab matrix) into ds9. The user should open ds9 before execution of this function.
ds9_dispsex.mds9Apr 201126-Feb-20151 Display markers around a list of sources on an image displayed using ds9.
ds9_exam.mds9Feb 200712-Nov-20152 Interactive examination of an image displayed in ds9. The program display an image in ds9 and then prompt the user to use various clicks to examin sources, vectors, and regions.
ds9_frame.mds9Feb 200724-Dec-20131 Switch ds9 display to a given frame number.
ds9_get_filename.mds9Jul 201124-Dec-20131 Get the file name of the image which is displayed in the current ds9 frame.
ds9_getbox.mds9 Feb 200707-Mar-20142 Get from the ds9 display the pixel values in a specified box region.
ds9_getcoo.mds9Feb 200724-Dec-20132 Interactively get the coordinates (X/Y or WCS) and value of the pixel selected by the mouse (left click) or by clicking any character on the ds9 display.
ds9_getvecprof.mds9Feb 200707-Mar-20142 Given the X and Y coordinates of two points, and an open ds9 display, get the value of the image in the display, interpolated along the line connecting the two points.
ds9_imserver.mds9Mar 201402-Mar-20142 load an image from one of the ds9 image servers into the ds9 display.
ds9_lineprof.mds9Jan 201307-Mar-20142 Interactive examination of vector in a FITS image displayed in ds9. The program display an image in ds9 and then prompt the user to click on two points in the image. Than the program reads from the image a vector between the two points and return/display the vector. THIS FUNCTION WILL BE REMOVED - USE ds9_exam.m
ds9_loop_disp.mds9Feb 200705-Jan-20131 Load a list of images (FITS file) into ds9 one by one. Prompt the user for the next image. Open ds9 before execution of this function.
ds9_phot.mds9 Feb 200727-Aug-20122 Interactive photometry for ds9 display. Allow the user to mark objects on the ds9 display, and perform centeroiding, and simple aperture photometry.
ds9_plotregion.mds9Feb 201115-Feb-20152 Write a region file containing various plots and load it to the ds9 display.
ds9_plottrace.mds9Feb 201105-Jan-20132 Given a list of X and Y plot Y(X) on the ds9 display.
ds9_print.mds9Feb 200724-Dec-20132 Print the current frame to PostScript or JPG file.
ds9_rd2xy.mds9 April 200724-Dec-20132 Convert J2000.0 RA/Dec in current ds9 display to physical or image X/Y coordinates.
ds9_regions.mds9Feb 200724-Dec-20132 Load, save or delete ds9 regions file.
ds9_save.mds9Mar 201402-Mar-20142 Save an image in the ds9 dispaly as a FITS image.
ds9_sdssnavi.mds9May 201105-Jan-20132 Click on a position in an image displayed in ds9 and this program will open the SDSS navigator web page for the coordinates.
ds9_slit.mds9Mar 201409-Mar-20142 Download an image from a ds9 server and plot a slit in the ds9 display. profile in the image along the slit.
ds9_start.mds9Aug 201220-Nov-20152 Checks whether ds9 is running, and if it is not running then start ds9.
ds9_system.mds9Oct 201323-Jan-20142 Matlab sets DYLD_LIBRARY_PATH incorrectly on OSX for ds9 to work. This function is a workround
ds9simcat.mds9Feb 201526-Feb-20152 Display SIM images (or any other images) in ds9, create or use associate source catalog, query the source catalog and display markers around selected sources.
binary_reflection_effect.mEBAugust 200115-Jan-20132 Calculate the reflection effect from a star with unit illumination on mirror (star) with radius R2.
binary_rv.mEBJan 201409-Jan-20142 Calculate binary star radial velocity as a function of time.
chi2_astrometric_binary.mEBJan 201414-Jan-20142 Given the astrometric observations of a binary and its eccentricity, Time of periastron and period, fit linearly the remaining four orbital elements (omega, Omega, i, a). This function is used by fit_astrometric_binary.m
eb_demo.mEBAug 200124-Jan-20132 GUI Eclipsing Binary light-curve demo.
eb_light_curve.mEBAug 200119-May-20142 Calculate eclipsing binary light curve as a function of time.
fit_astrometric_binary.mEBJan 201414-Jan-20142 Fit an elliptical-orbit binary orbit to astrometric data. The fit has 7 free parameters, 4 of which (omega, Omega, i, and a) are fitted linearly while two (T, e) are fitted non-linaerly and one (Period) is scanned.
limb_darkening.mEBAug 200123-Jan-20132 Calculate the star luminosity per unit area as a function of its radius, and given the limb-darkening parameters.
obstruction.mEBAug 200123-Jan-20132 Calculate stellar obstruction due to the eclipse given the stars radii, distance and limb darkening function of the background star.
plot_eb_lc.mEBAug 200124-Jan-20132 Plot eclipsing binary light curve as a function of time.
plot_eb_lc_ph.mEBAug 200119-May-20142 Plot eclipsing binary light curve as a function of phase.
total_light.mEBAug 200124-Jan-20132 Calculate the primary total light given its radius and limb darkening function or constant luminosity per unit area.
abberation.mephem October 201008-Aug-20132 Calculate the position of a star corrected for abberation deflection due to the Sun gravitational field. Rigoursly, these is applied after accounting for the light travel time effect and light deflection and before the precession and nutation are being applied.
add_offset.mephemMar 201012-Jul-20141 Add an offset specified by angular distance and position angle to celestial coordinates.
airmass.mephemApr 201119-Oct-20152 Given the JD, object celestial coordinates, and observer Geodetic coordinates, calculating the airmass of the object.
alt2ha.mephemJul 201429-Jul-20142 Given an object altitude and declination and the observer latitude, return the corresponding Hour Angle.
altha2dec.mephemJul 201429-Jul-20142 Given Altitude and Hour Angle of an object and the observer latitude, calculate the object Declination. There may be up to two solutions for the Declination.
angle_in2pi.mephemMay 201412-Nov-20142 Convert an angle to the range 0 to 2.*pi.
apsides_precession.mephemOct 200207-Apr-20142 First order estimation of the GR precession of the line of apsides.
area_sphere_polygon.mephem March 200725-Aug-20122 Calculate the area of a polygon on a sphere, where the polygon sides are assumed to be great circles. If the polygon is not closed (i.e., the first point is identical to the last point) then, the program close the polygon.
asteroid_magnitude.mephemOct 200109-Jul-20142 Calculate the magnitude of minor planets in the HG system. Valid for phase angles (Beta) in range 0 to 120 deg.
astrometric_binary.mephemJan 201412-Jul-20142 Given orbital elements of an astrometric binary, predicts its sky position as a function of time.
calc_vsop87.mephemMay 200130-Oct-20122 Calculate planetary coordinates using the VSOP87 theory.
cel_annulus_area.mephemJan 200630-Oct-20122 Calculate the area within a celestial annulus defined by an inner radius and outer radius of two concentric small circles.
celestial_circ.mephemDec 200509-Jul-20142 Calculate grid of longitude and latitude of a small circle on the celestial sphere.
coco.mephem Feb 200023-Dec-20151 General coordinate convertor. Convert/precess coordinate from/to Equatorial/galactic/Ecliptic coordinates.
constellation.mephemOct 200112-Jul-20142 Find the constellations in which celestial coordinates are located.
convert_year.mephemOct 201018-Apr-20152 Convert between different types of years. For example, this program can convert Julian years to Besselian years or JD and visa versa.
convertdms.mephemJun 200016-Feb-20152 Convert between various representations of coordinates and time as sexagesimal coordinates, degrees and radians.
coo2cosined.mephem Oct 201008-Jan-20151 Convert coordinates to cosine directions in the same reference frame. See also: cosined.m, cosined2coo.m
cosined.mephem July 199927-Aug-20121 Cosine direction transformation. Convert longitude and latitude to cosine direction and visa versa. See also: coo2cosined.m, cosined2coo.m
cosined2coo.mephem Oct 201012-Jul-20141 Convert cosine directions to coordinates in the same reference frame. See also: cosined.m, coo2cosined.m
daily_observability.mephemAug 200112-Jan-20132 Plot the observability of a given object from a give location on Earth during one night. This program will plot the object Alt during the night, along with the Sun/Moon alt and the excess in sky brightness due to the Moon.
days_in_month.mephemJan 200309-Jul-20142 Calculate the number of days in a given Gregorian or Julian month.
delta_t.mephemJun 201430-Jan-20152 Return \Delta{T} at a vector of Julian days. DeltaT is defined as ET-UT prior to 1984, and TT-UT1 after 1984 (= 32.184+(TAI-UTC)-(UT1-UTC)).
dnu_dt.mephemJul 201408-Jul-20142 Calculate dnu/dt and dr/dt for elliptical orbit using the Kepler Equation.
earth_gravity_field.mephemJul 201405-Jul-20142 Calculate the Earth gravity field for a set of locations. For both rotating and non rotating Earth. Mean IRTF pole is assumed.
earth_vel_ron_vondrak.mephemOct 201009-Jul-20142 Calculate the Earth barycentric velocity in respect to the mean equator and equinox of J2000.0, using a version of the Ron & Vondrak (1986) trigonometric series.
easter_date.mephemMay 200612-Jul-20142 Calculate the date of Easter for any Gregorian year.
eccentric2true_anomaly.mephemDec 201401-Dec-20142 Convert Eccentric anomaly to true anomaly.
ecliptic2helioecliptic.mephemNov 201412-Nov-20142 Transform ecliptic longitude to Helio-ecliptic longitude.
elements_1950to2000.mephemJul 201411-Jul-20142 Convert solar system orbital elements given in the B1950.0 FK4 reference frame to the J2000.0 FK5 reference frame.
equinox_solstice.mephemJul 201410-Jul-20142 Calculate the approximate time of Equinox and Solstice for a given list of years. Accurate to about 100s between year -1000 to 3000.
gauss_grav_const.mephemApr 200712-Jul-20142 Get the analog of the Gaussian gravitational constant for a system with a given primary mass, secondary mass and unit distance. This program is useful in order to apply kepler.m for non-solar system cases.
geoc2geod.mephem January 200027-Aug-20122 Convert Geocentric coordinates to Geodetic coordinates using specified reference ellipsoid.
geocentric2lsr.mephemSep 200305-Jul-20142 Approximate conversion of geocentric or heliocentric velocity to velocity relative to the local standard of rest (LSR).
geod2geoc.mephem January 200027-Aug-20122 Convert Geodetic coordinates to Geocentric coordinates using specified reference ellipsoid.
get_atime.mephemJune 200827-Aug-20121 Get current time, date, JD and LST.
get_moon.mephemJun 200812-Jul-20141 Get Moon position (low accuracy).
get_sun.mephemJune 200826-Aug-20121 Get Sun position (low accuracy).
ha2alt.mephemAug 201009-Jun-20151 Given Hour Angle as measured from the meridian, the source declination and the observer Geodetic latitude, calculate the source altitude above the horizon and its airmass.
ha2az.mephemAug 201009-Jun-20151 Given Hour Angle as measured from the meridian, the source declination and the observer Geodetic latitude, calculate the horizonal source azimuth
hardie.mephemJan 199409-Jul-20141 Calculate airmass using the Hardie formula.
hardie_inv.mephem September 200107-Sep-20122 Inverse Hardie airmass function. Convert airmass to zenith distance.
horiz_coo.mephemAug 199909-Jul-20141 Convert Right Ascension and Declination to horizontal coordinates or visa versa.
inside_celestial_box.mephem March 201008-Sep-20122 Given a list of celestial coordinates, and a box center, width and height, where the box sides are parallel to the coorinate system, check if the coordinates are within the box.
interp_coo.mephem March 201007-Sep-20122 Interpolate on celestial ccordinates as a function of time. Use the built in matlab interpolation functions.
jd2date.mephem September 199908-Sep-20121 Convert Julian days to Gregorian/Julian date.
jd2mjd.mephemDec 201328-Dec-20131 Convert JD to MJD
jd2year.mephemApr 200705-Jul-20141 Convert Julian day to Julian or Besselian years.
julday.mephemJan 199423-Dec-20141 Convert Julian/Gregorian date to Julian Day.
julday1.mephem January 199425-Aug-20121 Convert Gregorian date in the range 1901 to 2099 to Julian days (see also: julday.m).
jup_meridian.mephemAug 199905-Jul-20142 Low accuracy formula for Jupiter central meridian.
jup_satcurve.mephemAug 199910-Jul-20141 Plot monthly curves of the relative position of the Galilean satellites of Jupiter.
jupiter_map.mephemJan 200705-Jul-20142 Plot Jupiter image as observed from Earth at a given time.
keck_obs_limits.mephemOct 200514-Jan-20132 Given a date and object celestial positions, calculate the rise and set time of an object in Keck observatory, given the Nasmyth mount limits.
kepler3law.mephemNov 201204-Nov-20121 Calculate the velocity, semi-major axis and period of a system using the Kepler third law.
kepler_elliptic.mephemOct 200101-Dec-20142 Solve Kepler equation (M = E - e sin E) and find the true anomaly and radius vector for elliptical orbit (i.e., 0<=e<1). The function requires the time since periastron (t-T), the periastron distance (q) and the Gaussian constant for the system and units (k; see gauss_grav_const.m).
kepler_elliptic_fast.mephemDec 201401-Dec-20142 Fast solver for the Kepler equation for elliptic orbit. This is a simpler version of kepler_elliptic.m
kepler_hyperbolic.mephemOct 200101-Dec-20142 Solve Kepler equation (M = e sinh H - H) and find the true anomaly and radius vector for hyperbolic orbit (i.e., e>1). The function requires the time since periastron (t-T), the periastron distance (q) and the Gaussian constant for the system and units (k; see gauss_grav_const.m).
kepler_lowecc.mephemJul 201401-Dec-20142 Solve the Kepler Equation for low eccentricity using a series approximation. This is typically better than 1" for e<0.1.
kepler_parabolic.mephemOct 200101-Dec-20142 Solve Kepler equation (M = E - e sin E) and find the true anomaly (related to the eccentric anomaly, E) and radius vector for parabolic orbit (i.e., e=1). The function requires the time since periastron (t-T), the periastron distance (q) and the Gaussian constant for the system and units (k; see gauss_grav_const.m).
lst.mephemAug 199905-Jul-20141 Local Sidereal Time, (mean or apparent), for vector of JDs and a given East Longitude.
meteor_multistation.mephemDec 200124-Jan-20132 Given a list of observers geodetic coordinates in which the first point is a reference point; the azimuth and altitude in which an observer (located in the reference position) is looking to; and the height (H) of a meteor trail - calculate the azimuth and altitude in which observers in other points should look to, in order to detect the same meteor. The function takes into acount the Earth curvature (first order).
meteors_db.mephem Aug 201210-Jan-20142 Return a meteor showers database (not complete).
mjd2jd.mephemDec 201327-Jun-20151 Convert MJD to JD
month_name.mephemJan 200309-Jul-20141 Given a month number return a string with a month name.
moon_elp82.mephemJun 200012-Jul-20142 Calculate accurate ELP2000-82 ecliptic coordinates of the Moon, referred to the inertial mean ecliptic and equinox of date. This function was previously called moonpos.m.
moon_illum.mephemAugust 200626-Aug-20121 Low accuracy Moon illuminated fraction
moon_phases.mephemJul 200709-Jul-20142 Return a list of moon phases in range of dates.
moon_sky_brightness.mephemAugust 200025-Aug-20122 Given the date, object equatorial coordinates, and observer geodetic position, calculate the excess in sky brightness (V-band) in the object celestial position. The function utilize the algorithm by Krisciunas & Schaefer (1991).
moon_sky_brightness_h.mephemAugust 200025-Aug-20122 Given the horizontal coordinates of the Moon and an object and the observer geodetic position, calculate the excess in sky brightness (V-band) in the object celestial position. The function utilize the algorithm by Krisciunas & Schaefer (1991).
mooncool.mephemAug 199912-Jul-20141 Calculate low-accuracy topocentric equatorial coordinates of the Moon, referred to the equinox of date.
moonecool.mephemAug 199912-Jul-20142 Calculate low accuracy geocentric ecliptical coordinates of the Moon, referred to the mean equinox of date. Accuracy: in longitude and latitude ~1', distance ~50km To get apparent longitude add nutation in longitude.
moonlight.mephemAugust 199925-Aug-20122 Calculate the Moon illumination in Lux on horizontal surface as a function of the Moon altitude, horizontal parallax and Elongation.
nearest_coo.mephemDec 200510-Jan-20142 Given a list of coordinates (with arbitrary number of dimensions), search for the coordinate in list which is the nearest to a given (single) coordinate.
nutation.mephem Febuary 200029-Jun-20142 Calculate the Nutation in longitude and latitude, and the nutation rotation matrix. This is a low accuracy version based on the IAU 1984 nutation series. See also: nutation1984.m
nutation1980.mephemJun 201403-Jul-20142 Calculate the IAU 1980 Nutation series for a set of JDs.
nutation2rotmat.mephemJun 201429-Jun-20142 Given nutation in longitude and obliquity (in radians) and JD, return the Nutation rotation matrix.
nutation_lowacc.mephemJul 201405-Jul-20142 Low accuracy (~1") calculation of the nutation.
obliquity.mephemAug 199909-Jan-20141 Calculate the obliquity of ecliptic, with respect to the mean equator of date, for a given julian day.
observatory_coo.mephemAug 200127-Dec-20142 Return geodetic coordinates of an observatory.
obspl.mephemAug 200112-Jan-20132 GUI Observation Planer. Plot Alt/Airmass and moon sky brightness as a function of time in night, or yearly visibility plot per celestial object.
parallactic2ha.mephemNov 201319-Nov-20132 Convert parallactic angle, declination and latitude to hour angle. Note that there are two solutions, and the function will return both.
parallactic_angle.mephem October 200105-Aug-20131 Calculate the parallactic angle of an object. The parallactic is defined as the angle between the local zenith, the object and the celestial north pole measured westwerd (e.g., negative before, and positive after the passage through the southern meridian).
planar_sundial.mephemAugust 200627-Aug-20122 Calculate and plot a planar sundial.
planet_radius.mephem May 200127-Aug-20122 Get planetary radius and flattening factor, and calculate planet angular diameter.
planets_lunar_occultations.mephemDecember 200826-Aug-20122 Calculate local circumstences for lunar occultations of Planets and asteroids. Only events in which the planet is above the local horizon will be selected.
planets_magnitude.mephemMay 200109-Jan-20142 Calculate the planets apparent magnitude.
planets_rotation.mephemDecember 200426-Aug-20122 Return Planet north pole, rotation rate and the primery meridian.
ple_earth.mephem October 200126-Aug-20122 Low accuracy planetray ephemeris for Earth. Calculate Earth heliocentric longitude, latitude and radius vector referred to the mean ecliptic and equinox of date. Accuarcy: Better than 1' in long/lat, ~0.001 au in dist.
ple_jupiter.mephem October 200126-Aug-20122 Low accuracy planetray ephemeris for Jupiter. Calculate Jupiter heliocentric longitude, latitude and radius vector referred to mean ecliptic and equinox of date. Accuarcy: ~1' in long/lat, ~0.001 au in dist.
ple_mars.mephem October 200126-Aug-20122 Low accuracy planetray ephemeris for Mars. Calculate Mars heliocentric longitude latitude and radius vector referred to mean ecliptic and equinox of date. Accuarcy: Better than 1' in long/lat, ~0.001 au in dist.
ple_mercury.mephem October 200126-Aug-20122 Low accuracy ephemerides for Mercury. Calculate Mercury heliocentric longitude, latitude and radius vector referred to mean ecliptic and equinox of date. Accuarcy: better than 1' in long/lat, ~0.001 au in dist.
ple_neptune.mephem October 200126-Aug-20122 Low accuracy planetray ephemeris for Neptune. Calculate Neptune heliocentric longitude, latitude and radius vector referred to mean ecliptic and equinox of date. Accuarcy: Better than 1' in long/lat, ~0.001 au in dist.
ple_planet.mephemOct 200109-Jul-20142 Low accuracy ephemeris for the main planets. Given a planet name calculate its heliocentric coordinates referred to mean ecliptic and equinox of date. Accuarcy: Better ~1' in long/lat, ~0.001 au in dist.
ple_saturn.mephem October 200127-Aug-20122 Low accuracy planetray ephemeris for Saturn. Calculate Saturn heliocentric longitude, latitude and radius vector referred to mean ecliptic and equinox of date. Accuarcy: ~1' in long/lat, ~0.001 au in dist.
ple_uranus.mephem October 200126-Aug-20122 Low accuracy ephemeris for Uranus. Calculate Uranus heliocentric longitude, latitude and radius vector referred to mean ecliptic and equinox of date. Accuarcy: ~1' in long/lat, ~0.001 au in dist.
ple_venus.mephem October 200126-Aug-20122 Planetry Low accuracy ephemeris for Venus. Calculate Venus heliocentric longitude, latitude and radius vector referred to mean ecliptic and equinox of date. Accuarcy: Better than 1' in long/lat, ~0.001 au in dist.
pm2space_motion.mephem April 200627-Aug-20122 Convert proper motion, radial velocity and parralax to space motion vector in the equatorial system.
pm_vector.mephemAug 200129-Dec-20142 Return the space motion vector given proper motion, parallax and radial velocity.
pole_from2points.mephemJuly 200825-Aug-20122 Given two points on the celestial sphere (in any system) describing the equator of a coordinate system, find one of the poles of this coordinate system.
proper_motion.mephem January 201127-Aug-20122 Applay proper motion to a acatalog
refellipsoid.mephemJun 200009-Jul-20142 Return data for a given reference ellipsoid of Earth.
refraction.mephem Nov 200023-Dec-20151 Estimate atmospheric refraction, in visible light.
refraction_coocor.mephemOctober 201026-Aug-20121 Calculate the correction in equatorial coordinates due to atmospheric refraction.
refraction_wave.mephem Nov 201314-Dec-20152 Calculate the wavelength-dependent atmospheric refraction and index of refraction based on Cox (1999) formula.
rise_set.mephemSep 200126-Nov-20122 Given an object coordinates and observer position, calculate rise/set/transit times, and azimuth and altitude. The times are in the UT1 (not UTC) system.
rotm_coo.mephem23-Dec-20151 Generate a rotation matrix for coordinate conversion and precession.
saturn_rings.mephem May 200108-Sep-20122 Calculate the orientation angles for Saturn's rings.
search_conj.mephem April 200727-May-20142 Search for conjunctions on the celestial sphere between two moving objects given thier coordinates as a function of time.
search_conj_sm.mephem April 200727-May-20142 Search for conjunctions on the celestial sphere between a list of stationary points and a moving object given the coordinates of the moving object as a function of time.
sky_area_above_am.mephemJul 201419-Sep-20152 Calculate sky area observable during the night above a a specific airmass, and assuming each field is observable for at least TimeVis hours.
skylight.mephemAugust 199925-Aug-20122 Calculate the total sky illumination due to the Sun, Moon, stars and air-glow, in Lux on horizontal surface as a function of time.
sphere_dist.mephemFeb 200008-Jan-20151 Calculate the angular distance and position angle between two points on the celestial sphere.
sphere_dist_cosd.mephemJan 201508-Jan-20151 Calculate the angular distance between a set of two cosine vector directions. This should be used instead of sphere_dist_fast.m only if you have the cosine vectors.
sphere_dist_fast.mephemFeb 201304-Feb-20151 Calculate the angular distance between two points on the celestial sphere. See sphere_dist.m (and built in distance.m) for a more general function. This function is ~10 time faster than sphere_dist.m, but it works only with radians and calculate only the distance.
sphere_offset.mephemApr 200709-Jul-20141 Calculate the offset needed to move from a point on the celesial sphere to a second point on the celestial sphere, along longitide (small circle) and latitude (great circle). The needed offsets depends in which axis the offset is done first (longitude or latitude - 'rd' and 'dr' options, respectively).
sun_rise_set.mephemSep 200109-Jul-20142 Given the coordinates and observer position, calculate rise/set/transit/twilight times and azimuth and altitude for the Sun. The accuracy depends on the function used for calculating the solar position. With the default sun-position function, the geometric accuracy is about a few seconds.
suncoo.mephem September 199925-Aug-20121 Calculate the Sun equatorial coordinates using low accuracy formale. Accuracy : 0.01 deg. in long.
suncoo1.mephemAugust 199925-Aug-20121 Calculate the Sun equatorial coordinates using low accuracy formaulae for the range 1950 to 2050. Accuracy : 0.01 deg. in long, 0.1m in Equation of Time
sunlight.mephemAugust 199925-Aug-20122 Calculate the Sun illumination in Lux on horizontal surface as a function as its altitude in radians.
tai_utc.mephemJun 201428-Jun-20142 Return the TAI-UTC time difference (leap second) for a vector of Julian days. Also return TT-UTC.
tdb_tdt.mephemJun 200024-Jan-20132 Calculate approximate difference between TDT and TDB time scales.
thiele_innes.mephemJan 201405-Jan-20142 Calculate the Thiele-Innes orbital elements.
thiele_innes2el.mephemJan 201414-Jan-20142 Calculate the orbital elements from the Thiele-Innes orbital elements.
true2eccentric_anomaly.mephemDec 201401-Dec-20142
trueanom2pos.mephemAug 200108-Jan-20141 Given an object true anomaly, radius vector, time and orbital elements and time, calculate its orbital position in respect to the orbital elements reference frame.
trueanom2vel.mephemJan 201408-Jan-20142 Given an object true anomaly, radius vector, their derivatives and orbital elements and time, calculate its orbital position and velocity in respect to the orbital elements reference frame.
ut1_utc.mephemJun 201430-Jan-20152 Return UT1-UTC (also known as DUT1).
vb_ephem.mephemNovember 199508-Sep-20122 Given orbital elements of a visual binary, calculate its ephemeris in a give dates.
wget_eop.mephemJun 201430-Jan-20152 Get the table of historical and predicted Earth orientation parameters (EOP) from the IERS web site.
wget_tai_utc.mephemJun 201428-Jun-20142 Get the table of historical TAI-UTC time differences (leap second) from the IERS web site.
year2jd.mephemJun 201428-Jun-20142 Return the Julian day at Jan 1 st of a given list of years.
yearly_observability.mephemSep 200112-Jan-20132 Plot a yearly observability chart for an object.
bessel_icoef.mFitFun May 200609-Mar-20142 Calculate the Bessel interpolation coefficiant.
bin_sear.mFitFunSep 199410-Jul-20141 Binary search for a value in a sorted vector. If the value does not exist, return the closes index.
bin_sear2.mFitFunSep 199407-Jan-20152 Binary search for a value in a sorted vector. If the value does not exist, return the closes index.
calc_hessian.mFitFunJun 200525-Dec-20142 Calculate the Hessian (second derivative) matrix of a multivariable function.
centermass2d.mFitFun April 200725-Aug-20122 Calculate the center of mass and second moments of 2-dimensional matrix.
chi2_bivar_gauss.mFitFun May 200625-Aug-20122 Calculate the \chi^2 of a bivariate Gaussian with a data and error matrices: Chi2 = sumnd(((bivar_gauss(X,Y,Pars)-Data)/Error)^2))
chi2_nonsym.mFitFun April 201225-Aug-20122 Given measurments with non-symetric Gaussian errors (i.e., upper and lower errors are not equal), calculate the \chi^{2} relative to a given model.
chi2fit_nonlin.mFitFun Jan 200525-Aug-20122 Perform a non-linear \chi^2 fit to dataset.
chi2fit_nonlin_stab.mFitFunJan 200525-Aug-20122 Stab function for chi2fit_nonlin.m
clip_resid.mFitFunMay 201130-Jan-20152 Clip residuals using various methods including sigma clipping min/max, etc.
conrange.mFitFun Feb 200710-Jul-20142 Given two vectors of Y and X, calculate the range in X that satisfies the constrain Y<=(min(Y)+Offset). This is useful for calculating likelihood/chi^2 errors for 1-D data.
find_local_extramum.mFitFunMay 200621-Aug-20142 Given table of equally spaced data, use Stirling interpolation formula to find the local extramums of the tabulated data. The program find all the local extramums between X(Deg/2) to X(end-Deg/2), where Deg is the degree of interpolation.
find_local_zeros.mFitFun May 200616-Jan-20152 Given table of equally spaced data, use Stirling interpolation formula to find the local zeros of the tabulated data. The program find all the local zeros between X(Deg/2) to X(end-Deg/2), where Deg is the degree of interpolation.
fit_2d_polysurface.mFitFunAug 201321-Aug-20142 Fit a 2-D polynomial surface to z(x,y) data. e.g., Z= a + b.*X + c.*X.^3 + d.*X.*Y + e.*Y.^2.
fit_circle.mFitFun January 200425-Aug-20121 Fit points, on a plane or a sphere, to a circle. Calculate the best fit radius and the center of the circle.
fit_gauss1d.mFitFunApr 201501-Oct-20152 Fit a 1-D Gaussian without background using fminsearch. The Gaussian form is: Y=A/(Sigma*sqrt(2*pi))*exp(-(X-X0).^2./(2.*Sigma^2))
fit_gauss1da.mFitFunApr 201501-Oct-20152 Fit a 1-D Gaussian without background using fminsearch. The Gaussian form is: Y=A/(Sigma*sqrt(2*pi))*exp(-(X-X0).^2./(2.*Sigma^2))
fit_gauss2d.mFitFunMar 201420-May-20152 Non-linear fitting of a 2D elliptical Gaussian with background.
fit_gauss2dl.mFitFunAugust 201007-Mar-20142 Fit a 2-D Gaussian to data of the form f(x,y). f(x,y) = A*exp(-(a*(x-x0)^2+2*b*(x-x0)*(y-y0)+c*(y-y0)^2))
fit_lin.mFitFunJuly 200625-Aug-20122 Fit a general function which linear in its free parameters.
fit_pm_parallax.mFitFun September 200819-Jan-20142 Fit low-accuracy parallax and proper motion to a set of of celestial positions.
fit_pow.mFitFun May 201326-May-20132 Fit power-law function of the form Y=A*X^Alpha to data using non linear lesat squares.
fit_sn_rise.mFitFunJul 201301-Dec-20132 Fit various functions appropriate for the rise of SN light curve. The fitted functions are: L_max*(1-((t-t_max)/t_rise)^2) L_max.*(1-exp(-(t-t_start)./t_rise)) L_max.*erfc(sqrt(t_diff./(2.*(t-t_start))))
fitexp.mFitFunNovember 199630-Apr-20132 Fit an exponential function to data. The function has the form: Y = A * exp(-X./Tau).
fitgauss.mFitFun October 199625-Aug-20122 Fit a Gaussian function to data, where the Gaussian has the form: Y = A * exp(-0.5.*((X-X0)./s).^2).
fitgenpoly.mFitFunNov 201217-Feb-20142 Fit general polynomials (e.g., normal, Legendre, etc) to data. The fitted function has the form: Y = P(N+1) + P(N)*f_1(X) + ... + P(1)*f_N(X). Where f_i(X) are the polynomial functions. For example, in the case of normal polynomials these are f_1(X) = X, f_2(X) = X^2, etc.
fitharmo.mFitFun May 199425-Aug-20122 Fit trignometric functions with their harmonies to data. The fitted function is of the form: Y= a_1*sin(w1*t) + b_1*cos(w1*t) + a_2*sin(2*w1*t) + b_2*cos(2*w1*t) + ... a_n*sin(n_1*w1*t) + b_n*cos(n_1*w1*t) + ... c_1*sin(w2*t) + d_1*cos(w2*t) + ... s_0 + s_1*t + ... + s_n.*t.^n_s Note that w is angular frequncy, w=2*pi*f, while the use should indicate the frequency.
fitlegen.mFitFunJune 199817-Nov-20122 Fit Legendre polynomials to data, where the fitted function has the form: Y= a_0*L_0(X) + a_1*L_1(X) +...+ a_n*L_n(X) This function is replaced by fitgenpoly.m
fitpoly.mFitFunMar 199514-Oct-20151 Linear least squares polynomial fitting. Fit polynomial of th form: Y= a_0 + a_1*X + a_2*X^2 +...+ a_n*X^n to set of data points. Return the parameters, thir errors, the \chi^2 squars, and the covariance matrix. This function is replaced by fitgenpoly.m
fitpow.mFitFunNovember 199625-May-20131 Fit a power-law function of the form: Y = A * X ^(Gamma), to data set.
fitslope.mFitFun March 199517-Nov-20122 Linear least squares polynomial fitting, without the constant term. Fit polynomial of the form: Y= a_1*X + a_2*X^2 +...+ a_n*X^n to a set of data points. Return the parameters, their errors, the \chi^2, and the covariance matrix. This function is replaced by fitgenpoly.m
fminsearch_chi2.mFitFunApr 201307-Mar-20142 \chi^2 fitting using fminsearch.m and given a model function.
fminsearch_my.mFitFunApr 201319-Apr-20152 A version of the built in fminsearch.m function in which it is possible to pass additional parameters to the function, with no need for nested functions.
fun_binsearch.mFitFunFeb 200510-Jul-20141 Given a monotonic function, Y=Fun(X), and Y, search for X that satisfy Y=F(X). The search is done using a binary search between the values stated at X range.
get_fwhm.mFitFunMay 201411-May-20142 Given a 1-D vector estimate the FWHM by measuring the distance between the two extreme points with height of 0.5 of the maximum height.
interp_diff.mFitFunMay 200621-Aug-20141 Interpolation of equally spaced data using high-order differences.
interp_diff_ang.mFitFunMay 200609-Mar-20142 Given a vector of time and a vector of coordinate on a sphere interpolate the spherical coordinate in a list of times. This function is talking into account [0..2pi] angels discontinuity.
lin_fun.mFitFunJuly 200625-Aug-20122 Evaluate a cell array of functions, which are linear in the free parameters: i.e. Y=A(1)*Fun{1} + A(2)*Fun{2} + ...
ls_conjgrad.mFitFunNov 201301-Feb-20152 Solve a linear least squares problem using the conjugate gradient method.
mfind_bin.mFitFunJan 201510-Feb-20152 Binary search on a vector running simolutnously on multiple values. A feature of this program is that it you need to add 1 to the index in order to make sure the found value is larger than the searched value.
polyconf_cov.mFitFunJan 201320-Jan-20132 Estimate the 1-sigma confidence interval of a polynomial given the polynomial best fit parameters and its covariance matrix. REQUIRE FURTHER TESTING.
polyfit_sc.mFitFun April 200725-Aug-20122 Fitting a polynomial, of the form Y=P(1)*X^N + ... + P(N)*X + P(N+1) to data with no errors, but with sigma clipping:
polysubstitution.mFitFunJan 201328-Jan-20132 Given a polynomial [a_n*X^n+...+a_1*x+a_0] coefficients [a_n, a_n-1,..., a_1, a_0] and a the coefficients of a linear transformation of the form X=A_1*Z+A_0 [A_1, A_0], substitute the second polynomial into the first and find the new coefficients. This function is being used by fitgenpoly.m to change the variables in polynomials.
polysurface_fit.mFitFunAug 201010-Jul-20142 Fit a surface using a 2-D polynomials.
polysval.mFitFun April 201125-Aug-20122 Evaluate multiple polynomials at multiple points. Similar to polyval.m but allows a matrix of polynomials coefficients in which each rows is a different polynomial coefficients. The first column in P corresponds to the coefficient of the highest power and the last column for the power of zero.
coo2galexid.mGALEX April 201219-Jan-20132 Given a celestial equatorial coordinates, find all GALEX Vsn/Tilenum/Type/Ow/Prod/Img/Try number ID that cover the coordinates.
get_galex_corrim.mGALEX Apr 201225-Nov-20142 Given an GALEX field ID [Vsn, Tilenum, Type, Ow, Prod, Img, Try], get the link to, and the GALEX intensity/rrhr or count image in FITS format. Furthermore, read the corrected image into matlab matrix. The program first check if the FITS image exists in current directory and if so, it reads the image from the disk. Note that if nargout>1 then the fits file is retrieved.
and_mat.mGeneralMar 201409-Mar-20142 Perform logical and operation between all the columns or rows of a matrix.
and_nan.mGeneralDecember 200525-Aug-20122 Logical function "and" for NaNs. This function is similar to "and" logical function, but NaNs are regarded as no information using the following logical table: M1 M2 Result 1 1 1 1 0 0 0 1 0 0 0 0 NaN 1 1 NaN 0 0 1 NaN 1 0 NaN 0 NaN NaN 1
array_select.mGeneralJan 201523-Jan-20152 Given a matrix, select lines which their column fullfill a specific criteria. For example, the values in the second columns are in some range or follow a specific criterion.
assoc_range.mGeneralJun 201428-Jun-20142 Given a vector of data points and a vector of edges, for each value in the vector,return the index of the bin (defined by the edges) to which it belongs.
bivar_gauss.mGeneral May 200617-Nov-20151 Return the value of a normalized bivariate (2-dim) Gaussian: F = Const + Norm/(2*pi*SigmaX*SigmaY*sqrt(1-Rho^2)) * exp(-1/(2*(1-Rho^2))*((X-X0)^2/SigmaX^2 + (Y-Y0)^2/SigmaY^2 - 2*Rho*(X-X0)*(Y-Y0)/ (SigmaX*SigmaY)))
catfile.mGeneralApr 200713-Jul-20142 Concatenate files into a single file. Add a carriage return at the end of each Concatenated file.
chebyshev_poly.mGeneralAug 201011-Jan-20142 Evaluate Chebyshev polynomials
check_range.mGeneralApril 200727-Aug-20122 Given the size of an N-dimensional array, and minimum and amximum indices per each dimension, check if the indices are out of bounds. If the minimum or maximum indices are out of bounds return a new minimum and maximum indices that are in bound and nearest to the original indices.
circ_2d.mGeneralJul 201021-Mar-20142 Calculate a circule in 2-D (i.e., cylinder).
construct_fullpath.mGeneralJan 201504-Jan-20152 Construct a full path string to a program name, given its name, path or relative path and base path.
construct_keyval_string.mGeneralJan 201511-May-20152 Construct a ...,keyword, value,... string from pairs of parameters.
convert_energy.mGeneralFeb 200610-Jul-20142 Convert between different energy units.
convert_temp.mGeneralOct 200810-Jul-20142 Convert between temperature systems.
convert_units.mGeneralJul 200322-Dec-20141 Unit conversion function. Given an input and output strings containing unit names, return the conversion multiplication factor needed for converting the input units to the output units. The user is responsible for the balance of the transformation. Type of units: Length: 'mm' ; 'cm' ; 'inch' ; 'feet' ; 'm' - meter ; 'km' ; 'mile' ; 'erad' - Earth radius ; 'au' ; 'ly' - light year ; 'pc'; 'yard' Time: 's' ; 'min' ; 'hour' ; 'day'; 'sday' - sidereal day ; week ; 'year'; 'cen' - century Mass: 'gr'; 'kg'; 'emass' - Earth mass; 'jmass' - Jupiter mass; 'smass' - Solar mass; 'mp' - proton mass; 'me' - electron mass; 'libra';'pound' Energy: (see also convert_energy.m) 'erg'; 'J' Angle: 'rad' ; 'deg' ; 'amin' (or 'arcmin') - arcmin ; 'asec' (or 'arcsec') - arcsec Solid Angle: 'ster' ; 'sdeg' - square degree ; 'smin' - square arcmin ; 'ssec' - square arcsec
copy_files_from_dirtree.mGeneralJun 201213-Jul-20141 Given a location (or the present working directory), look for all files in the subdirectories and copy them to the main directory.
create_list.mGeneralApr 200718-Jul-20141 Create a file and a cell array containing a list of files. The list is created from a cell array, or file name with wildcards.
cross1_fast.mGeneralJul 201408-Jan-20152 cross product of two 3-elements vectors. This is a fast version of the cross.m function. This function will work only between two vectors.
cross_fast.mGeneralJan 201508-Jan-20152 cross product of two 3-columns matrices. This is a fast version of the cross.m function.
date_str2vec.mGeneralDec 201423-Dec-20142 Convert a string or a cell array of string containing date and time in the format 'YYYY-MM-DD HH:MM:SS.frac' or 'YYYY-MM-DD', to a matrix of dates with the following columns [Y M D H M S].
delete_cell.mGeneralJan 201504-Jan-20152 Delete a list of files listed in a cell array.
delete_ind.mGeneralDecember 200525-Aug-20121 Delete a column/s or row/s from a specific position in a matrix.
derivative.mGeneralFeb 201418-Feb-20142 Numerical derivative of a row vector.
epar.mGeneralJan 201329-Jan-20152 Allow the user to edit key/val parameters of functions. All the functions which use the set_varargin_keyval.m function will save their parameters into a file: ~matlab/.FunPars/_PAR.mat. The user then can change the default values of these parameters by "epar ".
eq_sampling.mGeneral 18-Jul-20142 Given two lists, each contains [X,Y], equalize the sampling frequency of the two lists by interpolating both lists to at a specified X.
fermi_fun.mGeneralAug 201419-Aug-20142 Calculate the Fermi function (Dermi-Dirac statistics) of the form 1/(1+exp((x-x0)/DX)).
file2str.mGeneral April 200723-May-20141 Read the content of a file into a string or cell vector (line per element).
filter_fft1.mGeneralAug 201419-Aug-20142 Filter a 1D equally spaced series using FFT.
find_peak.mGeneral Mar 200717-Feb-20142 Given a tabulated function [X,Y], find the maximum near a given X0.
find_peak_center.mGeneralFeb 201425-Feb-20142NaN
find_ranges.mGeneral Feb 200825-Aug-20121 Given a vector and several ranges, return the indices of values in the vector which are found within one of the ranges.
find_ranges_flag.mGeneralFeb 201420-Feb-20141 Given a vector and several ranges, return the a vector indicating if a given position in the input vector is included in one of the ranges.
find_strcmpi.mGeneralMar 201414-Mar-20141 find(strcmpi(varargin{:})) function. I.e., like strcmpi.m but returning the indices of true.
findmany.mGeneralNov 200918-Jul-20141 Find all values in a vector in another vector or matrix.
flag2regions.mGeneralMar 201406-Mar-20142 Given a column vector flags (true/false) returns pairs of indices of the positions of continuus regions in which the flag is true.
for_each_file.mGeneralDecember 200525-Aug-20122 Given a file name containing list of files, load each file into a matrix and execute a function with the loaded matrix as a paramter.
fpf.mGeneral March 200425-Aug-20122 Easy to use fprintf, with automatic formatting. This function is similar to fprintf, but (i) open and close the file automaticaly; (ii) in case that format string is not given then the function try to select a format string automaticaly based on the precision of each number.
fprintf_cell.mGeneral April 200725-Aug-20122 An fprintf command for a cell vector.
fun_gauss2d.mGeneralMar 201421-Apr-20152 Calculate bivariate Gaussian in a 2-D grid. This function is appropriate for minimization as the first input argument is the vector of free parameters.
fun_template.mGeneralMar 201424-Feb-20152 Generate a functionm template with help section and basic optional commands.
gauss_2d.mGeneralJul 201011-Nov-20142 Calculate bivariate Gaussian in a 2-D grid.
get_constant.mGeneralJul 200327-Dec-20122 Get the value of an astronomical/physical constant.
get_constant1.mGeneralJuly 200325-Aug-20121 Get the value of an astronomical/physical constant (old version). See also get_constant.m
group_cellstr.mGeneralMay 200609-Mar-20141 Given a cell array of strings create a cell array of indices of distinct strings (see example).
hour_str2frac.mGeneralDec 201423-Dec-20142 Convert a string or cell array of strings containing the hour in format HH:MM:SS.frac' to fraction of day.
image2avi.mGeneral May 200217-Feb-20132 Create avi file from list of images
ind_cell.mGeneral Feb 201225-Aug-20121 Given a cell vector in which each element contains a vector of the same length and a vecor of indices, return a new cell array of the same size in which each element contains a vecor of only the elements which indices are specified (see example).
index_outofbound.mGeneralSep 201303-Sep-20132 Given a vector of indices and the allowed size of the array will remove from the vector of indices any indices which are out of bound.
insert_ind.mGeneral December 200525-Aug-20121 Insert a column/s or row/s to a specific position in a matrix.
int2d.mGeneral Dec 201210-Dec-20122 Numerically interagte a 2-D matrix.
integral_percentile.mGeneralDecember 200525-Aug-20122 Given a numerically tabulated function (X,Y) and a percentile P, find the limits (a,b) such that int_{a}^{b}(Y(X)dx)=P (i.e., the integral of Y(X) from a to b equal P.
interp1_nan.mGeneralFeb 201417-Feb-20142 Interpolate over NaNs in 1-D vector.
interp1_sinc.mGeneralJun 201526-Nov-20152 Interpolation of a 1-D array using the Whittaker–Shannon interpolation formula (i.e., sinc interpolation).
interp2fast.mGeneralAug 201303-Sep-20132 A faster version of the interp2.m built in function. This function is faster than interp2.m when the XI and YI vectors span over a small range in the VecX and VecY space.
is_evenint.mGeneralApr 201515-Apr-20152 Check for each integer number in array if even.
isempty_cell.mGeneralApr 200713-Jul-20142 Given a cell array, return a matrix of flags indicating if each one of the cells is empty.
isfield_notempty.mGeneralJan 201511-May-20152 Check if a field exist in a structure and if it is not empty.
isnan_cell.mGeneralJun 201021-Aug-20132 Given a cell array, return a matrix of flags indicating if each one of the cells is nan.
lanczos_2d.mGeneralJul 201021-Mar-20142 Calculate lanczos function in 2-D.
latex_table.mGeneralOctober 200125-Aug-20122 Create a latex table from a data given in a cell array.
list2vec.mGeneralApr 201302-Apr-20132 Given an arbitrary number of arguments, each containing a vector, concatenate all vectors to a single vector.
load2.mGeneral January 201113-May-20152 load a mat file containing a single variable to a variable name (rather than a structure, like load.m). If multiple variables are returned then will behave like load.m
load_check.mGeneralMay 201110-Feb-20151 Load a matlab variable or file from disk (similar to the load.m command). However, before the variable is loaded the function checks if the variable with name identical to the file name is already exist in the matlab main workspace. If it is exist it will copy the variable from the workspace. If variable does not exist it will load it in the usual way and store it in the main workspace. This is usefull when you want to load big variables in multiple function calles.
loadh.mGeneralMay 201522-Jul-20152 load a matrix from HDF5 file. If dataset name is not provided than will read all datasets into a structure. This function doesn't support groups. This is becoming faster than matlab (2014a) for matices with more than ~10^4 elements.
lpar.mGeneralJan 201529-Jan-20152 List user default parameters for a function (see epar.m).
maskflag_check.mGeneralOct 201302-Mar-20142 Given a matrix or vector of bit masks and a list of bits to test, return true for indices in the matrix in which one of the bits specified in the list of bits is open.
maskflag_set.mGeneralFeb 201417-Feb-20142 Given a matrix or vector of bit masks, set specific bits of specific indices.
mat2vec.mGeneral 25-Aug-20121 Convert matrix to vector.
match_lists_index.mGeneralDecember 200025-Aug-20122 Match the lines in two matrices according to the values in one of the columns in each matrix.
median_sigclip.mGeneralFeb 201419-Feb-20142 A robust median calculation, by removing lower and upper percentiles prior to the median calculation.
nangetind.mGeneral January 201027-Feb-20142 Get elements from an array by its indices. However, unlike A(I,J) operation in matlab if I or J are out of bound then return NaN.
nanmedfilt1.mGeneralJun 200910-Jul-20142 One dimensional median filter that ignores NaNs.
nickel56_decay.mGeneralAug 200613-Jul-20142 Calculate the energy production of Nicel56->Cobalt->Iron radioactive decay as a function of time.
nlinfit_my.mGeneralApr 201309-Sep-20132 A version of the built in nlinfit.m function in which it is possible to pass additional parameters to the function, with no need for nested functions.
openb.mGeneralJan 201524-Jan-20152 open a matlab function in matlab editor (like the open command). Before the file is opened it is backuped in a backup (default is 'old') directory in the file directory under the name FileName.current_date
or_nan.mGeneralDecember 200525-Aug-20122 Logical function "or" for NaNs. This function is similar to "or" logical function, but NaNs are regarded as no information using the following logical table: M1 M2 Result 1 1 1 1 0 1 0 1 1 0 0 0 NaN 1 1 NaN 0 0 1 NaN 1 0 NaN 0 NaN NaN 1
prctile1.mGeneralJan 201409-Jan-20142 calculate the percenile of a sample in a vector. This is similar to the builtin function prctile.m but limited to vector inputs and somewhat faster.
q_fifo.mGeneralMar 200912-Jul-20141 Implementation of a first-in-first-out queue (FIFO). The queue is implemented using a cell array and each element in the queue can be of any matlab type.
quad_my.mGeneralApr 201315-Apr-20132 A version of the built in quad.m function in which it is possible to pass additional parameters to the function, with no need for nested functions.
read_formatted.mGeneralJan 200825-May-20142 Read text/data file with constant format (i.e., columns at specfied locations). The start and end column for each entry should be specified.
read_ipac_table.mGeneralMay 201428-Oct-20142
read_str_formatted.mGeneralMay 201410-Jul-20152 Read text/data string with constant format (i.e., columns at specfied locations). The start and end column for each entry should be specified.
remove_cell_element.mGeneralJune 200525-Aug-20121 Remove a list of indices from a cell vector.
saveh.mGeneralMay 201522-May-20152 Save a matrix into HDF5 file. If file exist then will add it as a new dataset to the same file. This is becoming faster than matlab (2014a) for matices with more than ~10^5 elements.
set_varargin_keyval.mGeneralJun 201023-Feb-20151 The purpose of this program is to handle a list of pairs of keywords and values input arguments. The program is responsible to check if the keywords are valid, and if a specific keyword is not supplied by the user, then the program will set it to its default value.
sn_calc.mGeneralJan 201408-Sep-20152 A signal-to-noise calculator for astronomical telescopes. Calculate S/N or limiting magnitude and field of view properties.
sn_cooling_rw.mGeneralDec 201428-Mar-20152 Calculate the shock cooling light curve (following the shock breakout) of a supernova, based on the Rabinak & Waxman (2011) model.
sort_numeric_cell.mGeneralOct 201210-Jul-20142 sort each row or columns in a cell array of numbers. see also: sortrows_numeric_cell.m
sort_struct.mGeneralJanuary 200825-Aug-20122 Sort in ascending order all the elements in a structure by one fields in the structure.
sp_powerlaw_int.mGeneralApr 201322-Apr-20132 Calculate the value the spherical integral and the line integral of a broken power law of the form: rho = K R^(-W1) R<=R0 rho = K R0^(W2-W1) R^(-W2) R>R0.
spacedel.mGeneralApr 201314-Apr-20132 Given a string, recursively delete all spaces.
spacetrim.mGeneralAug 201210-Jul-20142 Given a string, recursively replace any occurance of two spaces with a single space, such that the final product is a string with a single spaces between words.
sprintf2cell.mGeneralFeb 201516-Feb-20152 Generate a cell array of strings using the sprintf function, where the sprintf arguments, per string in cell is taken from a row in a matrix.
star_ang_rad.mGeneralJan 201405-Jan-20142 Empirical angular radii of stars based on their magnitude and colors.
stellar_imf.mGeneralApr 200610-Jul-20142 Return the stellar initial mass function in a given mass range.
str2double_check.mGeneralDec 201422-Dec-20142 Convert strings to doubles, but unlike str2double if the input is a number will return the number (instead of NaN).
str2num_nan.mGeneralJun 200718-Jan-20132 Convert string to number, and return NaN if not a number or empty.
str_duplicate.mGeneralNov 201324-Nov-20132 Duplicate a string multiple times.
strcmp_cell.mGeneralMay 201506-May-20152 Given two cell arrays of strings, check if each one of the strings in the first cell array exist in the second cell array.
strlines2cell.mGeneralMay 201423-May-20142 Given a string with end of line characters, break the string into a cell array in which each cell contains a line.
struct2keyvalcell.mGeneralSep 201329-Jan-20152 Given a structure convert the field names and their values to a cell array of ...,key,val,... arguments.
struct2varargin.mGeneralAug 201428-Aug-20142 Given a structure, prepare a cell array of all the field_names, field_values,... This is useful for converting InPar to varargin input.
struct_def.mGeneralJan 201510-Feb-20152 Define a structure array of a specific size with fields specified in a cell array of names.
structcon.mGeneralDecember 200725-Aug-20122 Concatenate two structures into one. Example: S1.A S1.B, and S2.A, S2.B: S=structcon(S1,S2,1); will return a structure S, with fields A and B which contains the content of [S1.A;S2.A] and [S1.B;S2.B], respectively. The concatantion can be done along the 1st or 2nd dimensions.
structcut.mGeneralJuly 200827-Aug-20122 Given a structure and a vector of indices, select from each field in the structure only the rows in each field which are specified by the vector of indices.
subtract_back1d.mGeneralOct 201219-Aug-20142 Subtract background level from a 1-D vector.
sum_bitor.mGeneralFeb 201427-Feb-20142 Given a 2D array of integers, perform a bitor operation on all lines or rows and return a vector ofbit-wise or.
summatlevel.mGeneralJun 200912-Jul-20142 Given a matrix and a level value, return the sum of all the values in the matrix which are larger than the level.
superdir.mGeneral May 201024-Sep-20122 A version of the matlab 'dir' function that can deal with more sophisticated types of wild cards. For example searching for: 'l*00[19-21].fits'.
system_list.mGeneralJan 201519-Jan-20152 Run the system command for a list of files.
systemarg.mGeneralJul 201410-Jul-20142 Running the UNIX system command.
trapzmat.mGeneralJun 200910-Jul-20142 Trapezoidal numerical integration on columns or rows of matrices. Contrary to trapz.m, the X input for this function can be a matrix.
triangle_2d.mGeneralJul 201021-Mar-20142 Calculate triangle in 2-D (i.e., cone).
unique_cell_grouping.mGeneralJune 201127-Aug-20122 Given a cell matrix containing eithr strings or numeric values, find unique lines in the cell matrix.
unique_count.mGeneralJan 201519-Jan-20152 Select unique values in numeric vector and count the number of apperances of each value.
user_name.mGeneralJan 201529-Jan-20152 Get the current user name.
wcl.mGeneralNov 200912-Jul-20142 Count the number of lines in a file.
which_dir.mGeneral Feb 200725-Aug-20121 Return the directory in which a matlab program resides. This program is a version of "which.m" that trim the program name from the full path.
wmedian.mGeneralJun 201514-Aug-20152 Weighted median for a vector. Calculates the weighted median of a vector given the error on each value in the vector.
xcorr_fft.mGeneralAugust 201012-Sep-20132 cross correlation of two 1-D serieses using FFT. The shortest vector will be padded by zeros (at the end).
xcorr_fft_multi.mGeneralSep 201312-Sep-20132 cross correlation of a 1-D series with multiple 1-D serieses using FFT. The shortest vector will be padded by zeros (at the end). This function return only the best correlation (and its shift) among all the columns in the multiple 1-D serieses.
curvlen.mGeomNov 199330-Jan-20152 Calculate the length of a curve by summing the distances (sqrt[X^2+Y^2]) between successive points.
dist_box_edge.mGeomJan 201417-Jan-20142 Given a rectangular box and a scalar position, calculate the distance to the nearest rectangular edge.
dist_p2line.mGeomFeb 200412-Jul-20142 Calculate the minimum distance in a 2-d space between a line and a point.
plane_dist.mGeomJan 200412-Jul-20141 Calculate the planner distance and angle between points.
polysort.mGeomMar 200712-Jul-20142 Given an (unsorted) convex polygon vertices, sort the vertices acording to their position angle as measured from the polygon center of mass.
rotm.mGeomFeb 199412-Jul-20141 Return a numeric or symbolic 3-D rotation matrix about the X, Y or Z axis.
traj_mindist.mGeomJun 200512-Jul-20142 Given two linear trajectories in the 2-D plane (x and y position as function of time), calculate the time in which the distance between the two trajectories is minimal and the distance at that time. Each line is defined by: x_i = A_i + B_i*(t - T_i) y_i = D_i + E_i*(t - T_t)
tri_equidist_center.mGeomFeb 201522-Feb-20152 Find the position of a point found in equal distances from the verteces of a planer triangle.
alpha_sis.mglens May 200523-May-20142 Calculate the gravitational lensing deflection angle for a softend isothermal sphere (SIS).
alpha_spl.mglensMarch 200525-Aug-20122 Calculate gravitational lensing deflection and magnification tensor for softened power law elliptical potential of the form: phi = b(s^2 + x^2 + y^2/q^2)^(alpha/2) - b/s^alpha
integrand_jn_ellkappa.mglens March 200523-May-20142 Calculate the integrand of J_n(x,y), for gravitational lensing softened elliptical mass distribution (See Keeton 2001, Eq. 15).
upsilon_u.mglens March 200525-Aug-20122 Calculate the upsilon(u) function (Eq. 15 in Keeton 2001).
gc_mid_section.mhtmJul 201111-Jul-20142 Given two points on a sphere, find the central point lying on the the shortest great circle section connecting the two points.
htm_build.mhtmJuly 201127-Aug-20122 Build Hierarchical Triangular Mesh (HTM) structure. This structure can be use for fast searches of data in catalogs on a sphere.
htm_build_son.mhtmJuly 201113-Mar-20152 An auxilary function for htm_build.m for building Hierarchical Triangular Mesh (HTM) structure.
htm_search_point.mhtmJul 201408-Jan-20152 Search for a single point-like coordinate in an HTM tree.
in_halfspace.mhtmJul 201101-Feb-20152 Given a unit vector R and half space (N,C) test if the point is contained inside the half space (N dot R > C). A halfspace is a plane that splits the sphere in two. It is defined by a direction vector (N) and a signed scalar (C), measured along the normal vector from the origin of the sphere.
in_polysphere.mhtmJul 201108-Jan-20152 Check if a list of positions are found within a convex polygon on the celestial sphere in which its sides are great circles. The polygon should be defined according to the right-hand rule.
search_htm_coocat.mhtmFeb 201522-Feb-20152
tree_collect_leafs.mhtmAug 201101-Feb-20132 Given a tree and a pointer to a node, collect all the leafs found at the last level below this node.
coo_trans.mImAstromMay 201508-Jun-20152 Coordinates transformation given a general transformation.
fit_affine2d_ns.mImAstromJan 201520-May-20152 Fit an 2D affine transformation, non-simultanously to both axes, to a set of control points. The fit is of the form: Xref = A*X - B*Y + C Yref = D*X + E*Y + F
fit_affine2d_s.mImAstromMay 201520-May-20152 Fit an 2D affine transformation, simultanously to both axes, to a set of control points. The fit is of the form: Xref = A*X - B*Y + C Yref = A*Y + B*X + D
fit_general2d_ns.mImAstromJan 201522-Dec-20152 Fit (or apply) a 2D general transformation, non-simultanously to both axes, to a set of control points. The fit is of the form: Xref = A + B*X - C*Y + D*AM*sin(Q1) + E*AM*sin(Q2) + ... F*AM*Color*sin(Q1) + G*AM*Color*sin(Q1) + ... PolyX(X) +PolyX(Y) + PolyX(R) + H*FunX(pars) Yref = A + B*X - C*Y + D*cos(Q1) + E*cos(Q2) + ... F*AM*Color*cos(Q1) + G*AM*Color*cos(Q1) + ... PolyY(X) +PolyY(Y) + PolyY(R) + H*FunY(pars) If the free parameters are supplied than the Cat input is transformed to the Ref system.
fit_tran2d.mImAstromJan 201525-May-20152 Fit a general transformation between two sets of control points (catalog and reference).
fits_get_wcs.mImAstromDec 201405-Nov-20152 Get the WCS keywords information from a SIM image structure array or FITS images.
get_fits_wcs.mImAstromJune 2005 30-Dec-20142 Get WCS keywords from FITS image. Obsolote - See instead fits_get_wcs.m
match_lists_shift.mImAstromJan 201530-Mar-20152 Given two lists containing two dimensional planar coordinates (X, Y), find the possible shift transformations between the two lists, using a histogram of all possible combination of X and Y distances.
read_ctype.mImAstromNov 201303-Dec-20132 Given a FITS header CTYPE keyword value (e.g., 'RA---TAN') return the coordinate type (e.g., RA) and transformation type (e.g., 'TAN').
sim_align_shift.mImAstromJan 201512-Oct-20152 Given a set of images and a reference image, register (align) the images to the reference image. This function is suitable for transformation which are mostly shifts (with some small rotation and distortions).
sim_footprint.mImAstromFeb 201526-Feb-20152 Return the footprint (verteces of images footprint) and center for a list of images.
sim_getcoo.mImAstromMar 201503-Jun-20152 Get J2000.0 R.A. and Dec. from image header or SIM header.
sky2xy.mImAstromDec 201401-Jan-20152 Given a FITS image, SIM or a structure containing the FITS WCS keyword (returned by fits_get_wcs.m), convert longitude and latitude to X and Y position in the image.
sky2xy_ait.mImAstrom Sep 201231-Dec-20142 Given a FITS image, SIM or a structure containing the FITS WCS keyword (returned by fits_get_wcs.m), where the WCS is represented using the Hammer-Aitoff projection, convert longitude and latitude to X and Y position.
sky2xy_tan.mImAstromNov 201231-Dec-20142 Given a FITS image, SIM or a structure containing the FITS WCS keyword (returned by fits_get_wcs.m), where the WCS is represented using the tangential projection, convert longitude and latitude position to X and Y in the image.
swarp.mImAstromJan 201509-Jun-20152 Run SWarp.
tri_match_lsq.mImAstromSep 201315-Jan-20152 Given two matrices of [X,Y, Mag] columns, where the Mag column is optional, attempt to find a shift+scale+rotation transformation between the two lists using triangle pattren matching.
tri_match_lsq2.mImAstromSep 201322-Jan-20152 Given two matrices of [X,Y, Mag] columns, where the Mag column is optional, attempt to find a shift+scale+rotation transformation between the two lists using triangle pattren matching.
xy2sky.mImAstromDec 201405-Feb-20152 Given a FITS image, SIM or a structure containing the FITS WCS keyword (returned by fits_get_wcs.m), convert X and Y position in the image to longitude and latitude.
xy2sky_ait.mImAstromSep 201231-Dec-20142 Given a FITS image, SIM or a structure containing the FITS WCS keyword (returned by fits_get_wcs.m), where the WCS is represented using the Hammer-Aitoff projection, convert X and Y position in the image to longitude and latitude.
xy2sky_tan.mImAstromNov 201231-Dec-20142 Given a FITS image, SIM or a structure containing the FITS WCS keyword (returned by fits_get_wcs.m), where the WCS is represented using the tangential projection, convert X and Y position in the image to longitude and latitude.
addcat2sim.mImBasicJan 201506-Sep-20152 Add a catalog into structure image array (SIM) or upload images and catalogs into SIM. The catalogs can be provided as a FITS table, or extracted from images.
bias_construct.mImBasicFeb 201427-Jan-20152 Construct a bias (or dark) image from a set bias (or dark) images. This function is not responsible for selecting good bias images.
ccdsec_convert.mImBasic Aug 201328-Feb-20142 Convert CCDSEC format (e.g., '[1:100,201:301]') from string to vector and vise versa.
cell_fitshead_addkey.mImBasicJune 201012-Jan-20152 A utility program to add new keywords, values and comments to a cell array containing A FITS header information. The FITS header cell array contains an arbitrary number of rows and 3 columns, where the columns are: {keyword_name, keyword_val, comment}. The comment column is optional.
cell_fitshead_delkey.mImBasicJune 201012-Jan-20152 A utility program to delete a keywords, values and comments from a cell array containing A FITS header information. The FITS header cell array contains an arbitrary number of rows and 3 columns, where the columns are: {keyword_name, keyword_val, comment}. The comment column is optional.
cell_fitshead_fix.mImBasicMar 201422-Mar-20142 Given an Nx3 cell array of FITS header. Remove blank lines and make sure the END keyword is at the end of the header.
cell_fitshead_getkey.mImBasicJune 201022-Dec-20142 A utility program to get a specific keywords, values and comments from a cell array containing A FITS header information. The FITS header cell array contains an arbitrary number of rows and 3 columns, where the columns are: {keyword_name, keyword_val, comment}. The comment column is optional.
cell_fitshead_search.mImBasicApr 201522-Apr-20152 Search for substring in FITS header stored as a cell array of 3 columns. Return and display all instances of the substring.
cell_fitshead_update.mImBasicJan 201512-Jan-20152 Update keywords in fits header cell.
clip_image_mean.mImBasicJan 201527-Apr-20152 Given a cube of images (image index is the third dimension), calculate the sigma clipped mean/median.
col_name2ind.mImBasicJan 201510-Feb-20152 Convert a columns index structure to cell of column names, and convert specific column names to indices.
col_name2indvec.mImBasicFeb 201519-Feb-20152 Given a cell array of names and another cell array containing a subset of column names, return the indices of the subset columns in the superset cell array.
construct_matched_filter2d.mImBasicSep 201412-Oct-20152 Construct an optimal 2D matched filter for sources detection in an image (given by S/(N^2)).
conv2_gauss.mImBasicJan 201009-Sep-20142 Convolve an image with a Gaussian or a top hat.
create_mat3d_images.mImBasicMar 201130-Nov-20122 Given a list of FITS images, read them into a 3D matrix, in which the third axis corresponds to the image index.
cube2sim.mImBasicMar 201404-Mar-20142 Convert a cube to a structure array of images (SIM).
cut_image.mImBasicJul 200525-Nov-20142 Cut subsection of an image (matrix) given the subsection coordinates, or center and size of subsection.
filter2smart.mImBasicApr 201512-Oct-20152 Cross correlate (i.e., filter) a 2D image with a given filter. The function is using either filter2.m or direct fft, according to the filter size compared with the image size.
fits_delete_keywords.mImBasicJun 201423-Jun-20142 Delete a list of header keywords from a list of FITS images.
fits_get_head.mImBasicJul 201403-May-20152 Read a specific Header Data Unit (HDU) in a FITS file into a cell array of {Keyword, Value, comment}.
fits_get_keys.mImBasicJul 201430-Dec-20142 Get the values of specific keywords from a single FITS file header. Use only for existing keywords.
fits_header_cell.mImBasicFeb 201427-Jan-20152 Read FITS image header to cell header. This function can be used instead of fitsinfo.m This function is obsolte: use fits_get_head.m instead.
fits_mget_keys.mImBasicJul 201413-Aug-20142 Get the values of specific keywords from a list of FITS files header.
fits_write_keywords.mImBasicJun 201407-Jul-20142 Insert new, or update existing FITS header keywords in a list of FITS images.
fitshead.mImBasicSep 201330-Dec-20142 Read FITS file header, convert it to a string, and print it to screen. Supress empty header lines.
fitsread_section.mImBasicJun 201430-Apr-20152 Read a rectangular region of interest from a single FITS image.
fitsread_section_many.mImBasicJun 201423-Jun-20142 Read a rectangular region of interest from a single FITS image.
fitswrite.mImBasicJune 201001-Mar-20142 Write a simple 2D FITS image. USE fitswrite_my.m instead!
fitswrite_me.mImBasicMar 201001-Mar-20142 Write a set of images to a single multi-extension FITS file.
fitswrite_my.mImBasicJune 201003-May-20152 Write a simple 2D FITS image.
fitswrite_my1.mImBasicJune 201003-May-20152 Write a simple 2D FITS image.
fitswrite_nd.mImBasicMar 201004-Mar-20142 Write a multi-dimensional FITS image to a file.
fitswrite_opt.mImBasicApr 201228-Feb-20142 Write a FITS image using fitswrite_my.m. This a version fitswrite_my.m with some additional options.
flat_construct.mImBasicFeb 201404-Mar-20142 Construct a flat field image from a set of images. This function is not responsible for selecting good flat images.
get_bitmask_def.mImBasicFeb 201422-Feb-20142 A database of bit mask definitions for astronomical images. This define the default bit mask definitions.
get_ccdsec_head.mImBasicFeb 201424-Jul-20142 Get an parse CCD section keyword value from a cell array containing an image header or a structure array containing multiple image headers.
get_fits_keyword.mImBasic May 200511-Jul-20142 Get list of user selected keywords value from the header of a single FITS file. See also: mget_fits_keyword.m
get_fitstable_col.mImBasicApr 201017-Jan-20151 Read a FITS table, and get the fits table column names from the FITS header.
get_sextractor_segmentation.mImBasicSep 201019-Jan-20132 Given a list of FITS images create segmentation FITS images for each one of them using SExtractor.
image2sim.mImBasicFeb 201428-Oct-20152 Read a single image to structure image data (SIM). For multiple files version of this program see images2sim.m.
image_art.mImBasicAug 201415-Dec-20152 Generate artificial images or add artificial sources to real images.
image_background.mImBasicFeb 201427-Apr-20152 Generate a background image and also a background subtracted image.
image_binning.mImBasicAug 201506-Aug-20152 Bin an image (whole pixel binning)
image_noise.mImBasicFeb 201428-Feb-20142 Calculate the teoretical noise image of a real image using its gain and readout noise.
image_shift.mImBasicMar 201430-Dec-20142 Shift an image in X and Y.
images2sim.mImBasicFeb 201414-Feb-20152 Read multiple images to structure array image data (SIM). For single file version of this program see image2sim.m.
imcombine.mImBasicJun 201019-Nov-20142 Combine set of 2D arrays into a single 2D array. This function use imcombine_fits.m to combine FITS images.
imcrdetect.mImBasicFeb 201427-Feb-20142 Find and remove cosmic rays in an astronomical image using the L.A.cosmic algorithm (van Dokkum 2001).
iminterp.mImBasicFeb 201427-Feb-20142 In a 2-D image interpolate over NaNs or over pixels in which a bit mask i set.
imlaplacian.mImBasicFeb 201416-Feb-20142 Calculate the laplacian of a 2-D image using a convolution kernel. This function is considerably faster than del2.m
is_arc_image.mImBasicFeb 201409-Mar-20142 Given a list of FITS images or SIM, look for arc (wavelength calibration) images. The search is done by looking for specific keyword values in the image headers.
is_bias_image.mImBasicFeb 201427-Jan-20152 Given a list of FITS images or SIM, look for good bias images. The search is done by looking for specific keyword values in the image headers, and also by checking the noise and mean properties of the images.
is_flat_image.mImBasicFeb 201401-Jan-20152 Given a list of FITS images or SIM, look for good flat field images. The search is done by looking for specific keyword values in the image headers.
is_head_keyval.mImBasicMar 201428-Jan-20152 Given image headers in a 3 column cell array format, go over a list of keywords and check if their values are equal to some specific strings or numbers.
is_saturated_image.mImBasicFeb 201424-Feb-20142 Count how many saturated pixels are in each image.
issim.mImBasicOct 201411-Oct-20142 Check if object is of SIM class.
lineprof.mImBasicFeb 200428-Feb-20142 Given two coordinates in a matrix the script return the intensity as function of position along the line between the two points.
medfilt2nan.mImBasic January 201109-Mar-20142 2-D median filter that ignores NaN's. This is similar to medfilt2.m, but ignoring NaNs.
medfilt_circ.mImBasicJun 201228-Feb-20142 Run a 2-D circular median filter (ignoring NaN) on an image. This function is very slow.
mget_fits_keyword.mImBasic May 200502-Sep-20152 Get list of user selected keywords value from the headers of multiple FITS files. See also get_fits_keyword.m
mode_image.mImBasicJune 201001-Feb-20152 Calculate the mode value of a 1D or 2D matrix. This function use bins widths which are adjusted to the noise statistics of the image.
prep_output_images_list.mImBasicJun 201119-Jan-20132 Prepare the output images list by concanating the output directory and prefix to file names. This is a utility program mainly used by some of the *_fits.m functions.
read2sim.mImBasicAug 201320-Feb-20142 Read a list of images into a structure array. A flexible utility that allows to generate a structure array of images from one of the following inputs: a matrix; cell of matrices; a string with wild cards (see sdir for flexibility); a file containing list of images (see create_list.m); a cell array of file names; or a structure array with image names. see read2cat.m for the analog function that works with catalogs. THIS FUNCTION IS OBSOLOTE use images2sim.m instead.
read_fitstable.mImBasicJan 201511-Feb-20152 Read binary or ascii FITS tables.
sim2cube.mImBasicAug 201301-Jan-20152 Given a structure array of images (generated by read2sim.m), generate a cube of all the images, in which the first dimension is the image index.
sim2file.mImBasicAug 201315-Feb-20142 Given a structure array of images (e.g., that was constructed by read2im.m), write each one of the images to the disk in several possible formats.
sim2fits.mImBasicAug 201427-Jan-20152 Write a single elemnet of a structure image array (SIM) as a FITS file. See sims2fits.m for writing multiple files.
sim_back_std.mImBasicSep 201502-Nov-20152 Estimate background and std of an image. The background and std are calculated in local blocks (bins), and than interpolated to each pixel.
sim_background.mImBasicFeb 201427-Apr-20152 Generate a background image and also a background subtracted image.
sim_bias.mImBasicFeb 201401-Jan-20152 Given a set of images, construct a bias image (or use a user supplied bias image), subtract the bias image from all the science images and save it to a structure array of bias subtracted images.
sim_ccdsec.mImBasicOct 201412-Jun-20152 Get CCDSEC keyword value from a Sim structure array. If not available use image size.
sim_class.mImBasicMay 201527-May-20152 Convert SIM image class to another class.
sim_coadd.mImBasicApr 201513-Oct-20152 Image caoddition, with optional offset, scaling, weighting and filtering.
sim_coadd_proper.mImBasicApr 201529-Dec-20152 Image caoddition, with optional offset, scaling, weighting and filtering.
sim_combine.mImBasicMar 201427-Apr-20152 Combine set of 2D arrays into a single 2D array. This function use imcombine_fits.m to combine FITS images.
sim_conv.mImBasicMar 201415-Jan-20152 Convolve a set of a structure images with a kernel.
sim_crdetect.mImBasicFeb 201421-Jan-20152 For images stored in a structure array (SIM) - Find and remove cosmic rays in an astronomical image using the L.A.cosmic algorithm (van Dokkum 2001).
sim_fft.mImBasicFeb 201429-Jan-20152 Calculate FFT or inverse FFT of structure images array (or SIM class).
sim_filter.mImBasicApr 201512-Oct-20152 cross-correlate SIM images with filters.
sim_flat.mImBasicFeb 201401-Jan-20152 Given a set of images, construct a flat image (or use a user supplied flat image), correct all the images by the flat image and save it to a structure array of flat field corrected images.
sim_flip.mImBasicFeb 201422-Mar-20152 Flip or transpose a set of structure images (SIM).
sim_gain.mImBasicJan 201507-May-20152NaN
sim_get_stamp.mImBasicNov 201425-Nov-20142 Get image stamps around locations from a set of images.
sim_getkeyval.mImBasicMar 201428-Apr-20152 Give a structure array of images and their headers, get the values of a specific header keyword. See sim_getkeyvals.m for a multiple keyword version.
sim_getkeyvals.mImBasicMar 201409-Jun-20152 Give a structure array of images and their headers, get the values of a specific header keywords.
sim_group_keyval.mImBasicMar 201409-Mar-20142 Given a structure array with image headers, and a list of header keywords, construct groups of images with identical keyword header values.
sim_head_search.mImBasicApr 201503-Jun-20152 Search for substring in Sim/FITS image headers.
sim_imagesize.mImBasicMar 201412-Jul-20142 Get the image size of a set of images.
sim_imarith.mImBasicFeb 201415-May-20152 Perform a binary arithmatic operations between two sets of images and or constants. The input can be any type of image, but the output is always a structure array. This program work on all images in memory and therefore require sufficient memory.
sim_julday.mImBasicOct 201428-Jan-20152 Get or calculate the Julian day of SIM images, based on their header information. This function is looking for the time and date in a set of header keywords and convert it to JD. The program can also use the exposure time to calculate the mid exposure time.
sim_mask_saturated.mImBasicFeb 201414-Mar-20142 For each image in a list of images, look for saturated pixels and generate a bit mask image with the saturated pixels marked.
sim_maskstars.mImBasicFeb 201421-Jan-20152 mask stars or high level pixels in a set of structure array images.
sim_mosaic.mImBasicApr 201530-Apr-20152 Mosaicing (tiling) a set of images into a single image.
sim_reduce_set.mImBasicMar 201421-Jan-20152 Reduce a set of images taken in the same configuration (e.g., identical image size, filter, Gain and RN). The reduction may include: flagging of saturated pixels, bias subtraction, flat field correction, CR flagging and removal.
sim_replace.mImBasicMar 201411-Jan-20152 Replace pixels in a give value ranges with other values in a set of structure images (SIM).
sim_resize.mImBasicFeb 201427-Mar-20142 Resize a set of structure array of images using the imresize.m function.
sim_rotate.mImBasicMar 201430-Dec-20142 Rotate a set of structure images (SIM).
sim_scaleflux.mImBasicApr 201506-May-20152 Scale the flux of SIM images.
sim_shift.mImBasicMar 201430-Dec-20142 Shift in X/Y coordinates a set of structure images (SIM).
sim_stat.mImBasicFeb 201424-Jul-20142 Given a set of images, calculate statistics of each image.
sim_std.mImBasicDec 201413-Oct-20152 Calculate the StD (or error) per image or per pixel for a set of SIM images.
sim_suboverscan.mImBasicFeb 201421-Aug-20142 Calculate and subtract overscan bias from a list of images.
sim_transform.mImBasicJan 201525-May-20152 Aplay a spatial transformation to a list of SIM images.
sim_trim.mImBasicFeb 201419-Feb-20152 Trim a set of images and save the result in a structure array. If needed, then additional associated images (e.g., mask) will be trimmed too.
sim_ufun.mImBasicFeb 201412-Feb-20152 Operate a unary function on a set of structure images (SIM).
sim_ufunv.mImBasicFeb 201411-Oct-20142 Operate a unary function that operate on all the elements of an image and return a scalar (e.g., @mean). The function are applied to a set of structure images (SIM).
sim_update_head.mImBasicMar 201427-Mar-20142
sim_xcorr.mImBasicMar 201430-Dec-20142 Cross correlate two sets of images. The input can be any type of image, but the output is always a structure array. This program work on all images in memory and therefore require sufficient memory.
sim_zeropad.mImBasicFeb 201504-May-20152 Pad SIM images with zeros.
simcat2array.mImBasicJan 201510-Feb-20152 Given a single elemnt structure array or SIM with 'Cat' and 'Col' fields, return a matrix containing the catalog fields, and the indices of some specified columns.
simdef.mImBasicNov 201403-Nov-20142 Define a SIM class with multiple entries (array).
sims2fits.mImBasicAug 201421-Jan-20152 Write all the images stored in a structure image array (SIM) as a FITS files. See sim2fits.m for writing a single files.
struct2sim.mImBasicOct 201412-Oct-20142 Convert a structure array to SIM object.
sum_prod_fft.mImBasicMay 201503-May-20152 Calculate the sum of products of 2-D fast fourier transform of two cubes. I.e., calculate sum_{i}{conj(fft(P_i))*fft(R_i)/Sigma^2} were the conj is optional and sigma is an optional normalization. P_i and R_i are 2D arrays.
weights4coadd.mImBasicApr 201508-Oct-20152 Calculate image weights for optimal coaddition under various assumptions. Also return imaages statistics including the images Std, Variance, Background, RN, Gain, ZP, relative Transperancy, PSF, SigmaX, SigmaY, Rho and FWHM.
xcat2sim.mImBasicFeb 201512-Feb-20152 cross-correlate external astronomical catalogs with a catalog or SIM catalog.
bias_fits.mImBasicOldJune 201013-Jan-20152 Given a set of images with the same size, look for the bias images, create a super bias image and subtract it from all the non-bias images. This function is obsolote: Use ImBasic toolbox.
find_size_fits.mImBasicOldJun 201019-Jan-20132 Given a list of 2D FITS images return the image sizes as specified in the image headers (NAXIS1, NAXIS2 keywords). Optionally, also look for all the unique sizes of images among the list and return sublists of all the images with a given size.
flat_fits.mImBasicOldJune 201013-Jan-20152 Given a set of images with the same size, construct a flat-field image for each filter and divide all the images of a given filter by the corresponding normalized flat field image. The script can look for twilight or dome flat images or alternatively construct a super flat image (see superflat_fits.m for details). Note that superflat_fits.m can remove stars from the images prior to creation of the flat image. This function is obsolote: Use ImBasic toolbox.
flatcreate_fits.mImBasicOldJune 201013-Jan-20152 Create a flat field from a single filter set of images. See also flat_fits.m; flatset.fits.m; optimal_flatnorm_fits.m This function is obsolote: Use ImBasic toolbox.
flatset_fits.mImBasicOldJune 201013-Jan-20152 Given a set of images from which to construct a flat field. Correct another set of images of the same size. This is a simpleer version of flat_fits.m which works on a predefined lists. All the images in these lists should be taken using the same filter (see also flat_fits.m). This function is obsolote: Use ImBasic toolbox.
get_ccdsec_fits.mImBasicOldJun 201004-Feb-20142 Get an parse CCD section keyword value from a list of images.
identify_bias_fits.mImBasicOldJune 201006-Apr-20132 Given a set of images, look for all the bias images. This script can be used also to identify errornous bias images.
identify_flat_fits.mImBasicOldJune 201028-Aug-20122 Given a set of images, look for all the flat images. The program also check if some of the flat images are saturated and if so reject them from the list of flat images.
imarith_fits.mImBasicOld Jun 201020-Sep-20132 Perform a binary arithmatic operations between two sets of images and or constants. The input can be either FITS images, matrices or structure arrays (see read2sim.m), while the output is always a file. This function load and work and save images one by one so it is not memory extensive. Use imarith_sim.m if you want to operate on all images in memory. Use of imarith_sim.m may save time in reading/writing FITS images, but requires a lot of memory.
imcombine_fits.mImBasicOldJun 201013-Jan-20152 Combine FITS images. This function use imcombine.m. This function is obsolote: Use ImBasic toolbox.
imconv_fits.mImBasicOldJune 201028-Aug-20122 Convolve a FITS image with a kernel.
imfft_fits.mImBasicOldJuly 201004-Mar-20142 Calculate the 2D Fast Fourier Transform of FITS images.
imflip_fits.mImBasicOldJun 201004-Mar-20142 Flip FITS images in x or y direction.
imfun_fits.mImBasicOldJune 201030-Nov-20122 Applay a function to a set of images. The function, may be operating on multiple images at a time.
imget_fits.mImBasicOldJun 201119-Jan-20132 Load a list of FITS images or mat files into a cell array of images. This is mainly used as a utility program by some of the *_fits.m function.
imifft_fits.mImBasicOldJuly 201004-Mar-20142 Calculate the 2D inverse Fast Fourier Transform of FITS images.
imreplace_fits.mImBasicOldJun 201007-Apr-20132 Search for pixels with value in a given range and replace them with another value.
imresize_fits.mImBasicOldJune 201004-Mar-20142 Resize a FITS image. This is dones by interpolation or convolution (using an interpolation kernel) so effectively this can be used also to convolve an image.
imrotate_fits.mImBasicOldJune 201004-Mar-20142 Rotate FITS images.
imstat_fits.mImBasicOldJune 201025-Aug-20132 Given a list of FITS images or images in matrix format calculate various statistics for each image.
imsubback_fits.mImBasicOldAugust 201008-Sep-20122 Subtract background from a 2-D matrix or a FITS image using various nethods.
imxcorr_fits.mImBasicOldJune 201007-Sep-20122 Cross correlate two FITS images using FFT and find the optimal linear shift between the two images. Optionally, the program subtract the background from the images before the cross-correlation step.
keyword_grouping1_fits.mImBasicOld Jul 201027-Aug-20122 Group images by a single image header keyword. For example, can be used to select all images taken with a given filter. see also: keyword_grouping_fits.m
keyword_grouping_fits.mImBasicOld Jul 201027-Aug-20122 Group images by multiple image header keywords. For example, can be used to select all images taken with a given filter and type. see also: keyword_grouping1_fits.m
maskstars_fits.mImBasicOldJune 201007-Sep-20122 Given a list of FITS images look for stars in these images or pixels with high value above background and replace these pixels by NaN or another value.
split_multiext_fits.mImBasicOldOct 201018-Jan-20132 Given a list of multi extension FITS files break each file to its multiple extensions. Each extension will be given the header of the primary FITS file with the extension header.
trim_fits.mImBasicOldJun 201030-Nov-20122 Trim a list of FITS images or 2D arrays.
aperphot.mImPhotJun 200511-Nov-20142 Aperture photometry. Given a matrix and a list of coordinates, calculate accurate centers for each object and perform aperture photometry.
def_bitmask_photpipeline.mImPhotFeb 201420-May-20152 The spectroscopic pipeline bit mask definition. Given the Bit mask name return the bit mask index.
flux2mag.mImPhotMay 201501-May-20152 Convert flux to magnitude or luptitude.
hst_acs_zp_apcorr.mImPhotFeb 200712-Jul-20142 Given aperture radius for photometry, and Hubble Space Telecsope (HST) ACS-WFC filter name, return the fraction, and error in fraction, of the encircled energy within the aperture.
mextractor.mImPhotApr 201527-Dec-20152 Source extractor written in MATLAB. Given an input images, and matched filter, this function filter the images by their matched filter and search for sources above a detection threshold. For each source the program measure its basic properties. The main difference between this program and SExtractor is that the noise ("sigma") is measured in the filtered image, rather than the unfiltered image.
moment2d.mImPhotMar 201418-Jan-20152 Given an image, calculate the moments and flux around given set of coordinates.
optimal_phot_aperture.mImPhotSep 201424-Mar-20152 Given a Gaussian symmetric PSF and image background and readout noise. Estimate the radius of the photometric aperture that maximize the S/N for an aperture photometry, for a given target S/N. Return also the signal of the source. Calculate under the assumption that the number of pixels in the background is continuous and not discrete. Also calculate the S/N for a PSF photometry.
phot_relzp.mImPhotJan 201517-May-20152 Given a matrix of instrumental magnitudes (and possibly errors) for aech epoch (image) and each source find the best fit zero point per epoch and mean magnitude per star that will minimize the residuals of the sources over all epochs. In its most basic form, this function solve the equation: InstMag_ij = ZP_i + _j, where ZP_i is the zero-point of the i-th image, and _j is the mean magnitude of the j-th star. UNDER DEVELOPMEMT - MAY CHANGE.
psf_builder.mImPhotJan 201523-Nov-20152 Construct the PSF for an images by averaging selected stars.
query_columns.mImPhotFeb 201515-Feb-20152 Query a table or catalog using a string containing logical operations on column names.
run_sextractor.mImPhot July 200304-Jan-20151 Run SExtractor from matlab. This function is obsolte. Use sextractor.m instead.
sextractor.mImPhotJan 201517-May-20152 execute sextracor on a set of FITS images or SIM images.
simcat_matchcoo.mImPhotJan 201518-May-20152 Given a structure array (SIM) of images and source catalogs and a reference image/catalog, match by coordinates the sources in each image against the reference catalog. For each requested property (e.g., 'XWIN_IMAGE') in the catalog, the function returns a matrix of the property of the matched sources. The matrix (ImageIndex,SourceIndex), rows and columns corresponds to images, and sources in the reference image, respectivelly. In addition, the function returns a structure array (element per image) of un-matched sources.
sn_aper_phot.mImPhotApr 201501-Apr-20152 Calculate the S/N (signal-to-noise ratio) for a point source with a symmetric Gaussian profile for aperture photometry.
sn_det2psf_signal.mImPhotSep 201509-Sep-20152 Given detection S/N calculate the PSF signal.
sn_psf_det.mImPhotAug 201506-Aug-20152 Calculate the S/N (signal-to-noise ratio) for a point source with a symmetric Gaussian profile for PSF (optimal) detection. Note this is different than PSF photometry (see sn_psf_phot.m).
sn_psf_phot.mImPhotMar 201506-Aug-20152 Calculate the S/N (signal-to-noise ratio) for a point source with a symmetric Gaussian profile for PSF (optimal) photometry.
sn_psfn_phot.mImPhotApr 201522-Apr-20152 Calculate the S/N (signal-to-noise ratio) for a numerical PSF (optimal) photometry.
sum_mag.mImPhotApr 201414-Apr-20142 Sum a set of magnitudes.
atmospheric_ext.mImSpecMay 200731-Jan-20142 Correct a spectrum for atmospheric extinction.
def_bitmask_specpipeline.mImSpecFeb 201428-Feb-20142 The spectroscopic pipeline bit mask definition. Given the Bit mask name return the bit mask index.
def_instrument_arc.mImSpecFeb 201413-Mar-20142 Definitions of how to identify spectroscopic arc accoring to the image header information. Given an instrument, this function return a header keyword name that contains the arc information, as well as the values of this keyword if the image is an arc image, and the translation of these various values to standard arc name.
eq_width.mImSpecJul 200505-Feb-20152 Given a spectrum calculate the equivalent width, flux, and center of selected spectral lines. The script has interactive and noninteractive modes. * Interactive mode: The user select (left click) pairs of wavelength positions marking the continuum around each line (right click to abort). * Noninteractive mode: If a second input argument is given then the lines properties are calculated noninteractively. This function is obsolete, use: fit_specline.m instead.
find_contrast_peaks.mImSpecMay 201017-Feb-20142 Given a list of [X, Y], find the position of local maxima in the list which are above a certain contrast above the local rms. The rms is defined as the 68 percentile of the extramum Y-value distribution, while the contrast is defined as the Y-value of the local maxima subtract from the preceeding local minima.
find_src1d.mImSpecFeb 201424-Mar-20142 Find sources (e.g., local maxima above the noise) in 1-D data. Find their location, S/N, width, and local background.
is_arc_image.mImSpecFeb 201425-Feb-20142 Given a list of FITS images or SIM, look for arc (wavelength calibration) images. The search is done by looking for specific keyword values in the image headers.
is_stdstar_image.mImSpecFeb 201405-Mar-20142 Given a list of FITS images or SIM, look for standard stars spectra. The search is done by comparing the RA/Dec or/and object name keywords with the database of spectroscopic standard stars.
read_fits_spec.mImSpecDecember 200920-Dec-20122 Get a spectrum from a FITS file. Currently support on CTYPE1='linear'.
spec_classify_images.mImSpecMar 201406-Apr-20142 Classify a list of images given their header keywords. For each imagee the program retrieve or calculate the value of some header keywords or some constants. Moreover, for another set of keywords the retrival mode may depends on the value of a specific keyword (e.g., specifying if a blue or red arm image).
spec_coadd1d.mImSpecMar 201424-Mar-20142
spec_collapse_dispaxis.mImSpecFeb 201425-Feb-20142 Given an image/s collapse each image to 1 D vector along one of the dimensions (e.g., "dispersion direction").
spec_convolve_resolution.mImSpecMar 201405-Mar-20142 Given a spectrum and a constant resolution term (dLambda/Lambda), convolve a filter which width equal to the resolution, with the spectrum. This function can be used to degrade a spectrum to a specific resolution.
spec_dbsp_bin.mImSpecMar 201414-Mar-20142
spec_extract_2d.mImSpecFeb 201428-Mar-20152 Given an image and a trace, cut a sub image along the trace position in which the trace is aligned along the X-axis.
spec_fit1d_psf.mImSpecJan 200709-Mar-20142 Given a traced and sky subtracted spectrum, extract the intensity of a single spectrum, along the dispersion axis, by fitting a 1-dimensional numerical PSF. The PSF is constructed by binning the spectrum.
spec_fluxcalib.mImSpecSep 201328-Mar-20152 Given the observed spectrum of a flux standard, and the flux standard calibrated spectrum outside the atmosphere, attempt to find the transmission function of the spectrograph and telescope.
spec_get_arc.mImSpecJan 201307-Feb-20152 Get a spectroscopic arc (template and lines list) from the SpecArcs.mat database, given the arc name.
spec_response.mImSpecSep 201328-Mar-20152 Given the observed spectrum of a flux standard, and the flux standard calibrated spectrum outside the atmosphere, attempt to find the transmission function of the spectrograph and telescope.
spec_skysub.mImSpec Feb 201428-Feb-20142 Subtract the sky from a 2-dimensional spectrum.
spec_skysub1.mImSpec April 200718-Feb-20142 Subtract the sky from a 2-dimensional spectrum.
spec_stitch.mImSpecJan 201406-Apr-20142 Given two spectra of a single object taken at different wavelength (e.g., blue side and red side), with or without an overlap between the spectra, this program find an optimal flux ratio shift between the two spectra, and return the stitched spectrum.
spec_telluric_template.mImSpecMar 201407-Mar-20142 Generate a Telluric template. Give a spectrum of the ratio between the calibrated observed spectrum and the standard star theoretical spectrum, and a vector of flags indicating if a wavelength is a Telluric line, return a template of the Telluric lines.
spec_trace.mImSpecFeb 201428-Mar-20142 Trace and extract spectrum from a 2-dimensional image.
spec_trace_extract_wave.mImSpecMar 201428-Mar-20152 A wrapper around spec_trace.m, spec_extract 2/1-d and automatic wavelength calibration.
spec_trace_int.mImSpecMar 201428-Mar-20142 Trace a spectrum in a single image by tracing the peak of the intensity pixel by pixel in the dispersion direction.
spec_wavecalib_lines.mImSpecMar 200731-Mar-20142 Given a spectrum with an approximate wavelength solution, identify lines in the spectrum and attempt to match them with list of spectral lines in template spectra (e.g., Arcs or sky lines). Then, refine the wavelength calibration by fitting a function (e.g., polynomial) to the lines in the spectrum to match the lines in the template.
spec_wavecalib_xcorr.mImSpecJan 201303-Apr-20142 Perform automatic wavelength calibration for 1-D spectrum, by cross corelating it with a template spectrum. The cross-correlation is done using various trial scales, so the program optimize for both the scale and shift. After the cross-correlation, refine the wavelength calibration by line matching.
read_kepler_lc_file.mKeplerJan 201027-Dec-20122 Read kepler light curve fits file.
microlens_ps.mmicrolensingFeb 200724-Jun-20142 Calculate the microlensing light curve for a point source, as a function of time (assuming linear motion).
microlens_psb.mmicrolensingJun 201424-Jun-20142 Calculate the microlensing light curve for a point source, in a list of a given source-lens distances.
microlens_psfs.mmicrolensingFeb 200730-Apr-20142 Calculate the microlensing light curve for a point source.
microlens_pspar.mmicrolensingJun 201426-Feb-20152 Calculate the microlensing light curve for a point source, as a function of time include annual parallax effects.
diffraction_circular.mOpticsJan 200821-May-20142 Calculate the theoretical diffraction pattern for a perfect circular aperture.
fresnel_occultation_filt.mOpticsJan 201431-Mar-20142 Calculates the diffraction pattern caused by a finite or point polychromatic source.
fresnel_occultation_fs.mOpticsJun 200921-Sep-20142 Calculate the diffraction pattern generated by a finite, non-point, monochromatic source.
fresnel_occultation_ps.mOpticsJun 200925-Sep-20142 Calculate the intensity pattern due to diffractive Fresnel occultation by a small circular object. Assuming a mono-chromatic observation and a point source.
fresnelc.mOpticsApr 200028-Jan-20142 Return the Fresnel cosine function f(T): cos(0.5*pi*T^2)
fresnels.mOpticsApr 200028-Jan-20142 Return the Fresnel sine function f(T): sin(0.5*pi*T^2)
im_seeing_sample.mOpticsMay 201421-May-20142 Given a 2D image (e.g., from a ray tracing simulation), convolve the image with the seeing disk, and resample the image (pixelize).
noll_index.mOpticsJan 201429-Jan-20142 Calculate the Zernike indices given the Noll index and visa versa.
phase_complex.mOpticsJan 201429-Jan-20142 Given an N-D array of complex numbers, return the phase of each complex number (i.e., atan2(imag(Matrix),real(Matrix))).
shifted_fft2.mOpticsJan 201429-Jan-20142 Given a matrix, return fftshift(fftshift(fft2(Matrix),1),2). This is the shifted fft of a matrix.
telescope_support.mOpticsFeb 201415-Oct-20152 Construct an image of a telescope entrance pupil (support). For example, a clear circular pupil.
wavefront2image.mOpticsFeb 201418-May-20142 Construct a wavefront from a matrix representation of the wavefront, and calculate the image plane of a point source with a given support (obstraction).
zer_cj_variance.mOpticsMay 201421-May-20142 Return the expectency of standard deviation of the atmospheric Zernike c_j coefficients.
zernike_xy.mOpticsJan 201422-May-20142 A driver function for the external zerfun.m function. Given a list of zernike indices and a grid in the X-Y plan calculate a cube of the zernike functions. The first and second dimensions of the cube corresponds to the X and Y axes, while the third dimension to the zernike index.
zerwavefront2image.mOpticsJan 201415-Oct-20152 Construct a wavefront using Zernike polynomials, and calculate the image plane of a point source with a given support (obstraction). This function sum all the zernike function in the pupil plane and generate the corresponding image plane.
zerwavefront2image_indiv.mOpticsJan 201421-May-20142 Construct a wavefront using Zernike polynomials, and calculate the image plane of a point source with a given support (obstraction). However, unlike wavefront.m this function works on individual Zernike polynomials and return a cube in which each the the third dimension corresponds to the image plane of an individual Zernike function.
axis01.mplottingJan 200512-Jul-20142 Create an axis that have only an the 0 X and Y axes.
cell_contourc.mplotting January 200827-Aug-20122 A contourc-like program that return a cell array of the contour levels.
contour_percentile.mplottingJun 200912-Jul-20142 Given a matrix, generate a contour plot in which the contours represent the percentiles of the total matrix sum. I.e., the region encompassed within the contour contains the given percentile of the matrix total sum.
date_axis.mplotting January 200025-Aug-20121 Given a graph in which the lower x-axis shows the Julian day, add a date-axis in the upper x-axis that corresponds to the Julian day.
draw_iline.mplotting October 199925-Aug-20121 Draw line interactively. Click the mouse right bottom in start point and at end point. Click left mouse button to exit this program.
errorxy.mplotting March 200426-Aug-20122 Plot graphs with error bars in both axes.
generate_colors.mplottingFeb 201418-Feb-20142 Generate equally spaced N colors from a given color map.
ginput_multi.mplottingJun 200512-Jul-20142 Get multiple ginput coordinates, for arbitrary number of points, using the mouse. Use left click to select multiple coordinates, and right click to abort.
gno.mplottingOct 199904-Oct-20142 Get the nearest object handle. The user click near a a figure objects, and the function return their handles and coordinates. Left click for object selection. Right click for exiting program.
graph.mplottingDecember 199325-Aug-20121 Given a two column matrix, plot the second column as a function of the first column. The function may get additional argument like the plot command.
hist_ofplot.mplottingJul 201112-Jul-20141 Given an existing plot, calculate histograms of the X and Y axis of the data in current figure axis. The x-axis histogram is displayed below the current plot, and the y-axis histogram is dispalyed on the right side.
insert_image.mplotting May 200626-Aug-20122 Insert an image to a matlab figure in a given position.
invy.mplottingFebruary 199425-Aug-20121 Invert the y-axis of the current axis. This is a shortcut command to axis('ij') and set(gca,'YDir','Inverse').
multi_axis.mplottingSep 200512-Jul-20141 Create additional x or y axis which is related to the exsiting axis by a given function.
patch_band.mplottingNov 200912-Jul-20142 Given X and Y positions describing a line, plot a band (i.e., using the patch command), around the line, where the patch is defined to have a given height below and above the line.
plot_compass.mplottingJul 200518-Jan-20132 Plon a compass on a plot or image.
plot_corner.mplottingNovember 201026-Aug-20122 Plot corners which lines are parallel to the axes.
plot_cs.mplottingMay 200712-Jul-20142 Plot colored symbols.
plot_ellipse.mplottingMar 200412-Jul-20142 Plot an ellipse with given properties.
plot_int.mplottingMay 200517-Feb-20142 Plot a 2-dimensional graph and interactively remove and restore data points from the plot.
plot_int1.mplottingJan 201321-Jan-20132 Given a plot wait for the use to click a keyboard key or a mouse click on the plot, and return the key and click position.
plot_invchildren.mplottingSep 201315-Sep-20132 Invert the order of the childrens under a given handle.
plot_lineprof.mplotting Feb 200425-Aug-20122 Clicking on two points in current image the script return the intensity as function of position along the line between the two points.
plot_rm.mplottingMay 200519-Jan-20132 Plot a 2-dimensional graph and interactively remove and restore data points from the plot. This function is being replaced by plot_int.m
plot_scale.mplottingJuly 200526-Aug-20122 Add a scale bar on a plot or image.
plot_select_points.mplottingFeb 201420-Feb-20142 Given an open plot, and X/Y vectors, let the use select using the left-mouse-click arbitrary number of points. For each points return the clicked position, and the nearest in the [X,Y] vectors. Right-mouse click to terminate. Use middle click to remove a point.
plot_slit.mplottingJul 200518-Jan-20132 Plot a slit (box) on a plot or image.
plotline.mplotting May 200625-Aug-20121 Plot a line given the position of its start point, length, and angle as measured in respect to the x-axis.
quiver1.mplottingMar 200412-Jul-20142 An improved quiver function. Allows to control the arrows properties and shape.
subplot1.mplotting June 200225-Aug-20121 An improved subplot function. Allows to control the gaps between sub plots and to define common axes.
subplot1c.mplotting Jun 200216-Jan-20132 Given a matrix with N-columns show subplots, of all the combinations of one column plotted against another column. Also return the correlations matrix between all the columns.
textrel.mplotting May 201324-Nov-20132 Write a text in current axis, where the position of the text is specified as a relative position in respect to the axis limits.
coherent_dedispersion.mradioNov 201427-Apr-20152NaN
fdmt.mradioNov 201427-Apr-20152 Performs the incoherent Fast Disperssion Measure Transform (FDMT; Zackay & Ofek 2015).
fdmt_fft.mradioNov 201427-Apr-20152 Performs the incoherent Fast Disperssion Measure-FFT Transform (FDMT-FFT) transform (Zackay & Ofek 2015).
fdmt_hybrid_coherent.mradioNov 201427-Apr-20152 Performs the coherent hybrid - FDMT transform for incoherent dedispersion. For further details and explanations, See Zackay and Ofek 2015. Algorithm 3.
fdmt_test.mradioNov 201427-Apr-20152 Test the fdmt.m, fdmt_fft.m and fdmt_hybrid_coherent.m algorithms.
read_sad.mradioJuly 201125-Aug-20122 Read AIPS SAD files.
stfft.mradioNov 201427-Apr-20152 Short time fast fourier transform (STFFT) of a time series. Each block (time bin) in the input series is FFTed, and the output is the FFT in each block. For a raw radio signal of voltage as a function of time, this function will return the amplitude as a function of frequency in each time bin.
vla_pbcorr.mradioJune 201125-Aug-20122 Calculate primary beam corrections for the VLA antena.
coo2run.msdss March 200706-Jul-20142 Given celestial equatorial coordinates, find all SDSS Run/Rerun/Col/Field number ID that cover the coordinates.
find_all_sdss82.msdss January 200725-Aug-20122 Look for all SDSS strip 82 images within a given box region. This script search the SDSS82_Fields.mat file
get_all_sdss82.msdss Jan 200625-Aug-20121 Download all SDSS strip 82 images within a given box region, in a given JD range and with a given seeing.
get_sdss_corrim.msdssJune 200509-Jul-20142 Given an SDSS field ID [Run, Rerun, Camcol, Field], get the link to, and the SDSS corrected image in FITS format. Furthermore, read the corrected image into matlab matrix. The program first check if the FITS image is exist in current directory and if so, it reads the image from the disk. Note that if nargout>1 then the fits file is retrieved.
get_sdss_finding_chart.msdss June 200526-Jan-20152 Get a link, JPG (and read it into matlab) of an SDSS finding chart directly from the SDSS sky server (Version: SDSS-DR8).
get_sdss_imcat.msdssJune 200525-Aug-20122 Given an SDSS field ID [Run, Rerun, Camcol, Field], get the link to, and the SDSS object catalog (tsObj) associated with a corrected image in FITS format. Furthermore, read the catalog into a matlab matrix. The program first check if the FITS table exist in current directory and if so, it reads the image from the disk. Note that if nargout>1 then the fits file is retrieved.
get_sdss_spectra.msdssJune 200502-Mar-20141 Given an SDSS soectra ID [Plate, MJD, Fiber], get the link to, and the SDSS 1d spectra in FITS format. Furthermore, read the spectra into matlab matrix. The program first check if the FITS image is exist in current directory and if so, it reads the image from the disk. Note that if nargout>1 then the fits file is retrieved.
get_sdss_tsfield.msdssJune 200525-Aug-20122 Given an SDSS field ID [Run, Rerun, Camcol, Field], get the link to, and the SDSS field catalog information (tsField) associated with a corrected image in FITS format. Furthermore, read the catalog into a matlab matrix. The program first check if the FITS table exist in current directory and if so, it reads the image from the disk. Note that if nargout>1 then the fits file is retrieved.
mag_calib_tsfield.msdss July 201025-Aug-20122 Use (or get and use) the SDSS tsField fits file to calculate the photometric zero point for a set of an SDSS FITS images.
prep_stripe82_deep.msdssAugust 200807-Sep-20122 Download all sdss stripe 82 images within a given box, a given JD range and seeing, and combine the images using swarp. The ouput images are named coadd.fits and coadd.weight.fits.
read_sdss_spec.msdssFeb 200802-Mar-20142 Read SDSS spectra in FITS format into matlab structure.
run2coo.msdss April 200712-Aug-20131 Convert SDSS run/rerun/camcol/field/object ID to coordinates.
run_sdss_sql.msdssJul 201417-Feb-20151 Run SQL query on SDSS database and retrieve the results into an array.
sdss_coo_radec.msdssJanuary 200625-Aug-20122 Convert the SDSS great circles coordinate system to J2000 right ascension and declination.
sdss_spec_mask_select.msdss October 200925-Aug-20122 Given a mask of the SDSS spectra in decimal format return indices for all the masks which are good and bad. Good mask defined to have "SP_MASK_OK" | "SP_MASK_EMLINE".
sedm_abswavecalib.mSEDMAug 201322-Aug-20142 Find an absolute wavelength calibration solution, relative to a calibrated template, for selected segments. The solutions are found by searching for a distortion transformation that match between the template and the observed spectra. This is later used by sedm_wavecalib.m to solve for the wavelength calibration for all the segments.
sedm_abswavecalib1.mSEDMAug 201321-Aug-20142 Find an absolute wavelength calibration solution, relative to a calibrated template, for selected segments. The solutions are found by searching for a distortion transformation that match between the template and the observed spectra. This is later used by sedm_wavecalib.m to solve for the wavelength calibration for all the segments. This is an older version of sedm_abswavecalib.m that may be usefull sometimes.
sedm_abswavecalib_indiv.mSEDMAug 201322-Aug-20142 Find an absolute wavelength calibration solution, relative to a calibrated template, for selected segments. The solutions are found by searching for a distortion transformation that match between the template and the observed spectra. This is later used by sedm_wavecalib.m to solve for the wavelength calibration for all the segments.
sedm_bias_subtraction.mSEDMSep 201301-Sep-20142 Subtract bias from SEDM image/s.
sedm_copy_wavecalib.mSEDMSep 201322-Aug-20142 Copy wavelength calibration information from a SegmentsInfo structure array of an Arc (i.e., after sedm_wavecalib.m) to that of a science SegmentsInfo structure array.
sedm_extract_spec_cube.mSEDMSep 201315-Sep-20132 Extract a source and background spectrum from a SEDM cube.
sedm_extract_spexcell.mSEDMAug 201322-Aug-20142 Given a SEDM SegmentsInfo structure returned by sedm_generate_spexcell_segmentation.m and a science or calibration image, search for the exact position and slope of the trace in each spexcell using the SegmentsInfo as a first guess.
sedm_generate_spexcell_segmentation.mSEDMAug 201313-Aug-20142 Use SEDM dome flat images to generatre segmentation map of the individual spexcells (i.e., each segment is marked by a serial number).
sedm_plot_seg_int.mSEDMAug 201423-Aug-20142 Calculate for each spexcell its median value within a givenb wavelength range and store it in SegmentsInfo, and plot the median intensity of each spexcell as a function of its mean X/Y position.
sedm_plottrace.mSEDMAug 201312-Sep-20132 plot a spexcell trace/s on image.
sedm_prep_nightlog.mSEDMAug 201413-Aug-20142 Given a list of SEDM images, prepare a log file of images with basic information derived from the image headers.
sedm_refine_slopepos.mSEDMAug 201312-Sep-20132 Given a SEDM SegmentsInfo structure returned by sedm_generate_spexcell_segmentation.m and a science or calibration image, search for the exact position and slope of the trace in eac spexcell using the SegmentsInfo as a first guess.
sedm_segments2cube.mSEDMAug 201326-Aug-20142 Given a SegmentsInfo structure that contains in each element the wavelength calibrated spectrum of each spexcell, generate a cube of flux values as a function of X position, Y position and wavelength.
sedm_wavecalib.mSEDMAug 201321-Aug-20142 Find and apply the wavelength calibration to all the spexcells. The function ...
sedm_wavelength_xcorr.mSEDMAug 201318-Aug-20142 Given two spectra and a distortion transformation describing the relation between the wavelength of the two spectra, return the negative of the cross-correlation of the two spectra after applying the transformation.
build_chandra_obsid_cat.mSwiftJan 201502-Feb-20152 Construct a catalog of all Chandra observations by going over the entire Chandra image archive.
chandra_psf.mSwiftJan 201329-Jan-20132 Read and interpolate the Chandra ACIS-S/ACIS-I PSF from the Chandra CalDB files. Instellation: 1. Install the Chandra CalDB directory including the 2d PSFs. 2. Modify the DefV.CalDBdir to direct to the Chandra CalDB directory.
filter_badtimes.mSwiftJan 201519-Jan-20152 Given a structure array containing X-ray event catalogs and a list of bad times, remove the bad times from the list.
read_chandra_acis.mSwiftJan 201521-Jan-20152 Read Chandra ACIS event files associated with a Chandra ObsID and add columns containing the RA and Dec for each event. If needed cd to osbid directory.
search_filetemplate.mSwiftFeb 201319-Feb-20132 Given a directory name, search recursively within the directory and all its subdirectories, file names with a specific template. File path that contains a specific string can be excluded
swxrt_coo2xy.mSwiftNovember 201125-Aug-20121 Given a Swift XRT event file (image) convert J2000.0 equatorial coordinates to X/Y (image) position. see also: swxrt_xy2coo.m
swxrt_filter_badtimes.mSwift Feb 201207-Sep-20122 Given an X-ray event file, look for time ranges in which the background is elevated above the mean background rate by a given amount.
swxrt_getobs.mSwiftSep 201229-Sep-20122 Look for Swift/XRT observations taken in a given coordinates. Return a link to the directories containing the observations, and retrieve the cleaned "pc" event file for each observation. Instelation: (1) install "browse_extract_wget.pl" from http://heasarc.gsfc.nasa.gov/W3Browse/w3batchinfo.html (2) Set the RelPath variable in this program to specify the path of "browse_extract_wget.pl" script relative to the path of this program.
swxrt_src.mSwiftJan 201115-Jul-20132 Given a Swift/XRT image and a position. Measure the counts in the position and the bacground counts in an annulus around the position.
swxrt_xy2coo.mSwiftNovember 201125-Aug-20121 Given a Swift XRT event file (image) convert X/Y (image) position to J2000.0 equatorial coordinates. see also: swxrt_coo2xy.m
table_select.mSwiftJan 201515-Jan-20152 Given a table (e.g., X-ray events), select events based on selection criteria.
wget_chandra_obsid.mSwiftJan 201515-Jan-20152 Get all the files associated with a Chandra ObsID
arp.mtimeseriesSep 199412-Jul-20142 Calculate the autoregessive process of order p. Moddeling an evenly spaced time series, z(t), with: z(t) = sum_i[a(i)*z(t-i)] + err(t)
bin_by_eye.mtimeseries January 200318-Jan-20131 Bin light curve by eye. The function plots the light curve and let the user to define bins using the mouse. The user mark (with the mouse) the beginning and end points of each bin. The left and right limits of each user defined bin are marked on the plot using cyan and red dashed lines, respectively.
binning.mtimeseriesFeb 199930-Jan-20151 Binning a timeseries using equally spaced bins. In each bin, calculate the mean, median, std, skewness of the data.
ccf_diff.mtimeseriesApr 201409-Apr-20142 Given two equally sapced time series of the same length, calculate the difference between points of distance N and calculate the correlation between this differences in the two serieses. Return the correlation as a function of distance N. This is usefull if trying to estimate if the correlation between two series is due to high or low frequency. Supports partial correlations.
ccf_fft.mtimeseriesDec 201309-Apr-20142 Calculate the normalized cross correlation function of two evenly spaced timeseries using fft.
ccf_o.mtimeseriesNovember 199525-Aug-20122 Cross correlation function for two sets of equally spaced time series.
cusum.mtimeseriesOct 199425-Dec-20132 cumulative sum (CUSUM) chart to detect non stationarity in the mean of an evenly spaced series.
dcf.mtimeseriesSep 201003-Sep-20142 Discrete cross-correlation function and structure function for two sets of unequaly spaced stationary time series.
extract_phase.mtimeseries October 199425-Aug-20122 Given a time series, extract observation made in a given phases range. The phase and epoch is defined by the user.
folding.mtimeseriesNov 199312-Jul-20141 Folding a time series into a period, and calculate the phase for each data point in the time series.
folding_solarsys.mtimeseriesJul 201320-Jul-20132 Folding a time series of a solar system object into a period, and calculate the phase for each data point in the time series. Taking into account ligh travel effect, phase correction due to phase angle, and phase angle changes in brightness.
hjd.mtimeseriesNov 199312-Mar-20152 Convert Julian Day (UTC) to Helicentric/Barycentric Julian Day for geocentric observer.
matched_filter.mtimeseriesFeb 201419-Feb-20142 Run a matched filter (North filter) for a 1-D series and return the possible peaks (signal) above a given threshold.
period.mtimeseriesMay 201124-Feb-20152 Periodicy search in a time series. This function can be used to run different types of periodicity searches and window functions, and automatically select the range of frequencies to search.
period_fft.mtimeseriesJul 200912-Jul-20142 Calculate power spectrum for evenly spaced time series using fast Fourier transform. See also period.m
period_norm.mtimeseriesMay 201124-Feb-20152 Calculate the normalized normal power spectrum of a times series. See period.m for a more flexiable function.
period_norm_order2.mtimeseriesMay 201124-Feb-20152 Calculate the normalized power spectrum of the second order of a times series (i.e., assuming that the first and second harmonies have the same amplitude). See period.m for a more flexiable function.
period_norm_solarsys.mtimeseriesJul 201312-Jul-20142 Calculate the un-normalized normal power spectrum of a times series for a solar system object orbiting the Sun. Taking into account ligh travel effect, phase correction due to phase angle, and phase angle changes in brightness.
period_normnl.mtimeseriesMay 201131-Aug-20142 Calculate the classical (Lomb) power spectrum of a time series using no loops. See period.m for a more flexiable function.
period_scargle.mtimeseriesMay 201112-Jul-20142 Calculate the un-normalized Scargle power spectrum of a times series. See period.m for a more flexiable function.
periodia.mtimeseriesDec 199312-Jul-20141 Classical power-spectrum of a non-evenly spaced time series. The power spectrum is normalized by the variance of the data. THIS FUNCTION IS BEING REPLACED BY period.m
periodis.mtimeseriesMar 199412-Jul-20141 Lomb-Scargle periodigram. Calculate the Lomb-Scargle power spectrum for a time series. THIS FUNCTION IS BEING REPLACED BY period.m
periodmulti_norm.mtimeseriesSep 201212-Jul-20142 Calculate the normal power spectrum of a set of multiple times series which have common times. This program run the power spectrum simultaneously for all time serieses and its is faster than running the power spectrum on a single time series at a time.
perioent.mtimeseriesNov 199630-Jan-20152 Periodogram using information entropy. For each trail period, the phase-magnitude space is divided into m by m cells, and the information entropy is calculated. Then the probability to find observations in each square is MU(i) and the Entropy is (-Sigma{MU*ln(MU)}). The output Entropy is normalized by ln(m*m).
plot_period_folder.mtimeseries Feb 200726-Aug-20122 Given the power spectrum and light curve, let the user to interactively select peaks in the power spectrum, and present the folded (and binned) light curve for the selected periods.
polysubs.mtimeseries May 199428-Aug-20122 Subtract polynomial from a data set (no errors).
runmean1.mtimeseriesSep 201309-Mar-20141 running mean on a 1-D vector.
sf_interp.mtimeseriesDec 200212-Jul-20142 Interpolate a time series, and estimate the errors due to the interpolation using the structure function of the time series. The error in each interpolated point is calculated by adding in quadrature the error of the neastest point with the amplitude of the stracture function at the the lag equal to the difference between the interpolated point and the nearest point.
simulated_elc.mtimeseriesJan 200812-Jul-20142 Given a model light curve, generate a list of time-tagged events that their rate follows the model light curve. The events are generated between the first and last time in the model light curve. Note that the first event is always at the first time in the model light curve. The rate at each time is calculated using a second order approximation: Tau0*(1 + dTau/dt + [dTau/dt]^2).
specwin.mtimeseries October 199428-Aug-20122 Calculate the spectral window of a time series. THIS FUNCTION IS BEING REPLACED BY period.m
stdfilt1.mtimeseriesJune 200921-Dec-20122 One dimensional StD filter.
taper.mtimeseriesJan 201319-Jan-20132 Generate a taper function for a timeseries. Taper function is a weight/window function in the time domain. This can be used in order to give reduce weight to data found near the edges of a timeseries in order to reduce aliasing with the series length.
coo2wise_coaddid.mWISEApr 201207-Jul-20142 Given celestial equatorial coordinates, find all WISE coadd_id string ID that covers the coordinates.
cgibin_parse_query_str.mwwwDec 201409-Dec-20142 Break a URL parameters query string to parameter names and values.
find_urls.mwwwFeb 201303-Feb-20152 Given a URL, read the URL content and extract all the links within the URL and return a cell array of all the links. Optionaly, the program can filter URL using regular expressions.
ftp_dir_list.mwwwJan 201514-Jan-20152 Given an FTP URL that contains only a file listing, return a cell array of all the files URLs.
html_page.mwwwApr 200724-Jan-20132 Create an HTML file. The file contains the necessery header and footer and a supplied content.
html_table.mwwwMay 200624-Jan-20132 Given a matlab matrix or cell array create an html page with the matrix in an html table.
install_astro_matlab.mwwwFeb 201520-Nov-20152 Install or update the astronomy and astrophysics package for matlab.
install_eran_matlab.mwwwDec 201224-Jan-20132 install or update the astronomy and astrophysics packages for matlab.
mwget.mwwwMay 201024-Jan-20132 A wrapper around the wget command. Retrieve a URL using the wget command. See also pwget.m, rftpget.m.
parse_html_table.mwwwJun 201024-Jan-20132 Parse columns from an HTML table into matlab. The program can not parse tables with colspan parameter different than 1.
pwget.mwwwOct 201220-Oct-20152 Parallel wget function designed to retrieve multiple files using parallel wget commands. If fast communication is available, running several wget commands in parallel allows almost linear increase in the download speed. After exceuting pwget.m it is difficult to kill it. In order to stop the execuation while it is running you have to create a file name 'kill_pwget' in the directory in which pwget is running (e.g., "touch kill_pwget").
rftpget.mwwwMay 201014-Feb-20152 A wrapper around the wget command designed to recursively retrieve the entire directory tree in an FTP site. See also: mwget.m, pwget.m, find_urls.m
SIM.mclassNov 201418-Apr-20152 A class of structure array of images (SIM)


Constructed: September 2012, Eran Ofek