diff options
author | Thomas White <taw@physics.org> | 2019-05-13 15:09:58 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-05-14 11:30:33 +0200 |
commit | e2b4a5e2ac5445c3d103632aebf637cd1d1af0f8 (patch) | |
tree | ac328c391db46f8244930d45209e8c40f135e3d8 /libcrystfel/src/spectrum.h | |
parent | d88e1e65f971e19c6a66155bf67776fe3875098d (diff) |
Update Spectrum API
Diffstat (limited to 'libcrystfel/src/spectrum.h')
-rw-r--r-- | libcrystfel/src/spectrum.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libcrystfel/src/spectrum.h b/libcrystfel/src/spectrum.h index abce55a2..2bcd0322 100644 --- a/libcrystfel/src/spectrum.h +++ b/libcrystfel/src/spectrum.h @@ -61,24 +61,23 @@ struct gaussian extern "C" { #endif +/* Alloc/free */ extern Spectrum *spectrum_new(void); - extern void spectrum_free(Spectrum *s); +extern Spectrum *spectrum_load(const char *filename); -extern int spectrum_get_num_gaussians(Spectrum *s, double tol); - -extern struct gaussian spectrum_get_gaussian(Spectrum *s, int n); - -extern double spectrum_get_density_at_k(Spectrum *s, double k); - -extern void spectrum_get_range(Spectrum *s, double tol, - double *kmin, double *kmax); - +/* Representation as Gaussians */ extern void spectrum_set_gaussians(Spectrum *s, struct gaussian *gs, int n_gauss); +extern int spectrum_get_num_gaussians(Spectrum *s); +extern struct gaussian spectrum_get_gaussian(Spectrum *s, int n); +/* Representation as histogram */ extern void spectrum_set_histogram(Spectrum *s, double *kcens, double *heights, int nbins); +extern void spectrum_get_range(Spectrum *s, double *kmin, double *kmax); +extern double spectrum_get_density_at_k(Spectrum *s, double k); + #ifdef __cplusplus } |