Top | ![]() |
![]() |
![]() |
![]() |
GwySpectra * | gwy_spectra_new () |
GwySpectra * | gwy_spectra_new_alike () |
void | gwy_spectra_data_changed () |
GwySpectra * | gwy_spectra_copy () |
void | gwy_spectra_assign () |
GwySIUnit * | gwy_spectra_get_si_unit_xy () |
void | gwy_spectra_set_si_unit_xy () |
void | gwy_spectra_getpos () |
void | gwy_spectra_setpos () |
guint | gwy_spectra_get_n_spectra () |
GwyDataLine * | gwy_spectra_get_spectrum () |
void | gwy_spectra_set_spectrum () |
void | gwy_spectra_set_spectrum_selected () |
gboolean | gwy_spectra_get_spectrum_selected () |
void | gwy_spectra_find_nearest () |
void | gwy_spectra_add_spectrum () |
void | gwy_spectra_remove_spectrum () |
const gchar * | gwy_spectra_get_title () |
void | gwy_spectra_set_title () |
const gchar * | gwy_spectra_get_spectrum_x_label () |
void | gwy_spectra_set_spectrum_x_label () |
const gchar * | gwy_spectra_get_spectrum_y_label () |
void | gwy_spectra_set_spectrum_y_label () |
void | gwy_spectra_clear () |
GwySpectra contains an array of GwyDataLines and coordinates representing where in a data field the spectrum was acquired.
GwySpectra *
gwy_spectra_new (void
);
Creates a new spectrum set containing zero spectra.
GwySpectra *
gwy_spectra_new_alike (GwySpectra *model
);
Creates a new spectrum set similar to an existing one, but containing zero spectra.
Use gwy_spectra_copy()
if you want to copy a spectrum set including the spectra in it.
void
gwy_spectra_data_changed (GwySpectra *spectra
);
Emits signal "data_changed" on a spectrum set.
GwySpectra *
gwy_spectra_copy (GwySpectra *spectra
);
Create a new spectrum set as a copy of an existing one.
This function is a convenience gwy_serializable_copy()
wrapper.
void gwy_spectra_assign (GwySpectra *destination
,GwySpectra *source
);
Makes one spectrum set equal to another.
This function is a convenience gwy_serializable_assign()
wrapper.
GwySIUnit *
gwy_spectra_get_si_unit_xy (GwySpectra *spectra
);
Gets unit used for the location co-ordinates of spectra.
void gwy_spectra_set_si_unit_xy (GwySpectra *spectra
,GwySIUnit *si_unit
);
Sets the SI unit corresponding to the location co-ordinates of the spectrum set.
It does not assume a reference on si_unit
, instead it adds its own reference.
void gwy_spectra_getpos (GwySpectra *spectra
,guint i
,gdouble *x
,gdouble *y
);
Gets the coordinates of one spectrum.
void gwy_spectra_setpos (GwySpectra *spectra
,guint i
,gdouble x
,gdouble y
);
Sets the location coordinates of a spectrum.
guint
gwy_spectra_get_n_spectra (GwySpectra *spectra
);
Gets the number of spectra in a spectrum set.
GwyDataLine * gwy_spectra_get_spectrum (GwySpectra *spectra
,gint i
);
Gets a dataline that contains the spectrum at index i.
void gwy_spectra_set_spectrum (GwySpectra *spectra
,guint i
,GwyDataLine *new_spectrum
);
Replaces a spectrum in a spectrum set.
spectra |
A spectrum set. |
|
i |
Index of a spectrum to replace |
|
new_spectrum |
A GwyDataLine Object containing the new spectrum. |
void gwy_spectra_set_spectrum_selected (GwySpectra *spectra
,guint i
,gboolean selected
);
Sets selected state of a spectrum in a spectrum set.
gboolean gwy_spectra_get_spectrum_selected (GwySpectra *spectra
,guint i
);
Gets the selected state of a spectrum in a spectrum set.
void gwy_spectra_find_nearest (GwySpectra *spectra
,gdouble x
,gdouble y
,guint n
,guint *ilist
);
Finds spectra closest to given coordinates.
Point indices in ilist
will be sorted by the distance from (x
, y
) from the closes to the farthest.
It is not an error to pass n
larger than the number of spectra. However, the positions after the number of spectra
in spectra
will be left uninitialised.
void gwy_spectra_add_spectrum (GwySpectra *spectra
,GwyDataLine *new_spectrum
,gdouble x
,gdouble y
);
Adds a new spectrum to the spectra collection with a position of x, y.
The spectra collection takes a reference to new_spectrum
.
void gwy_spectra_remove_spectrum (GwySpectra *spectra
,guint i
);
Removes the ith spectrum from the Spectra collection. The subsequent spectra are moved down one place.
const gchar *
gwy_spectra_get_title (GwySpectra *spectra
);
Gets the title of spectra.
void gwy_spectra_set_title (GwySpectra *spectra
,const gchar *title
);
Sets the title of the spectra collection.
const gchar *
gwy_spectra_get_spectrum_x_label (GwySpectra *spectra
);
Gets the spectrum abscissa label of a spectrum set.
void gwy_spectra_set_spectrum_x_label (GwySpectra *spectra
,const gchar *label
);
Sets the spectrum abscissa label of a spectrum set.
const gchar *
gwy_spectra_get_spectrum_y_label (GwySpectra *spectra
);
Gets the spectrum ordinate label of a spectrum set.
void gwy_spectra_set_spectrum_y_label (GwySpectra *spectra
,const gchar *label
);
Sets the spectrum ordinate label of a spectrum set.
void
gwy_spectra_clear (GwySpectra *spectra
);
Removes all spectra from the collection.
“data-changed”
signalvoid user_function (GwySpectra *gwyspectra, gpointer user_data)
The ::data-changed signal is never emitted by the spectra itself. It is intended as a means to notify other spectra users they should update themselves.
gwyspectra |
The GwySpectra which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First