138 dashtab = g_malloc0(
sizeof*dashtab);
216 else if (
axis < 0.0025)
220 else if (
axis < 0.005)
224 else if (
axis < 0.025)
228 else if (
axis < 0.05)
232 else if (
axis < 0.25)
236 else if (
axis < 0.5 )
240 else if (
axis < 1.5 )
276 else if (
axis < 1000)
280 else if (
axis < 5000)
284 else if (
axis < 10000)
288 else if (
axis < 50000)
292 else if (
axis < 100000)
296 else if (
axis < 500000)
300 else if (
axis < 1000000)
328 x_min =
resol[0] * this_curve -> frame_pos[0][0];
329 x_max =
resol[0] * this_curve -> frame_pos[0][1];
330 y_max =
resol[1] * (1.0 - this_curve -> frame_pos[1][1]);
332 y_min =
resol[1] * (1.0 - this_curve -> frame_pos[1][0]);
360 if (
active_project -> analysis[rid] -> curves[cid] -> data[i] != NULL)
362 g_free (
active_project -> analysis[rid] -> curves[cid] -> data[i]);
386 for (i=0; i<interv; i++)
394 for (i=0; i<interv; i++)
396 active_project -> analysis[rid] -> curves[cid] -> data[0][i] = i*delta_omega;
411void save_curve_ (
int * interv,
double datacurve[* interv],
int * cid,
int * rid)
426 int inter = (* rid ==
SPH) ? * interv/2 + 1: * interv;
427 if (* rid ==
SKD || (* rid ==
SKT && * cid < active_project -> skt_sets))
429 this_curve -> ndata = inter;
443 for (i=0; i<inter; i++)
445 this_curve -> data[1][i] = datacurve[i*2];
450 j = (this_curve -> extrac) ? this_curve -> extrac -> extras : 0;
451 if (this_curve -> extrac) this_curve -> extrac -> extras = 0;
453 if (this_curve -> extrac) this_curve -> extrac -> extras = j;
454 this_curve ->
majt[i] =
scale (this_curve -> axmax[i] - this_curve -> axmin[i]);
455 this_curve -> mint[i] = 2;
460 this_curve -> ndata = 0;
475 for ( i = 0 ; i < this_proj -> analysis[c] -> numc ; i ++ )
477 if (this_proj -> analysis[c] -> curves[i])
479 if (this_proj -> analysis[c] -> curves[i] -> window)
485 g_free (this_proj -> analysis[c] -> curves[i] ->
path);
486 this_proj -> analysis[c] -> curves[i] ->
path = NULL;
512 if (this_proj -> analysis)
516 if (this_proj -> analysis[j])
518 if (this_proj -> analysis[j] -> idcc != NULL)
520 for (k=0; k<this_proj -> analysis[j] -> numc; k++)
522 if (this_proj -> analysis[j] -> curves[k] -> extrac > 0)
524 ctmp = this_proj -> analysis[j] -> curves[k] -> extrac -> first;
525 for (l=0; l<this_proj -> analysis[j] -> curves[k] -> extrac -> extras; l++)
527 if (ctmp ->
id.a == a && ctmp ->
id.b == b && ctmp ->
id.c == c)
529 remove_extra (this_proj -> analysis[j] -> curves[k] -> extrac, ctmp);
532 if (ctmp -> next != NULL) ctmp = ctmp -> next;
555 for (i=0 ; i<this_proj -> analysis[c] -> numc; i ++)
557 if (this_proj -> analysis[c] -> curves[i])
562 if (this_proj -> analysis[c] -> curves[i] -> data[j])
564 g_free (this_proj -> analysis[c] -> curves[i] -> data[j]);
565 this_proj -> analysis[c] -> curves[i] -> data[j] = NULL;
567 if (this_proj -> analysis[c] -> curves[i] -> axis_title[j])
569 g_free (this_proj -> analysis[c] -> curves[i] -> axis_title[j]);
571 g_free (this_proj -> analysis[c] -> curves[i] -> labels_font[j]);
572 this_proj -> analysis[c] -> curves[i] -> labels_font[j] = NULL;
573 g_free (this_proj -> analysis[c] -> curves[i] -> axis_title_font[j]);
574 this_proj -> analysis[c] -> curves[i] -> axis_title_font[j] = NULL;
576 if (this_proj -> analysis[c] -> curves[i] -> name)
578 g_free (this_proj -> analysis[c] -> curves[i] -> name);
579 this_proj -> analysis[c] -> curves[i] -> name = NULL;
581 if (this_proj -> analysis[c] -> curves[i] -> title)
583 g_free (this_proj -> analysis[c] -> curves[i] -> title);
584 this_proj -> analysis[c] -> curves[i] -> title = NULL;
586 if (this_proj -> analysis[c] -> curves[i] -> title_font)
588 g_free (this_proj -> analysis[c] -> curves[i] -> title_font);
589 this_proj -> analysis[c] -> curves[i] -> title_font = NULL;
591 g_free (this_proj -> analysis[c] -> curves[i] -> legend_font);
592 g_free (this_proj -> analysis[c] -> curves[i] ->
layout);
593 g_free (this_proj -> analysis[c] -> curves[i] -> extrac);
594 g_free (this_proj -> analysis[c] -> curves[i]);
595 this_proj -> analysis[c] -> curves[i] = NULL;
614 for (k=0; k<this_proj -> analysis[j] -> numc; k++)
616 if (this_proj -> analysis[j] -> curves[k] ->
plot != NULL)
620 gtk_widget_queue_draw (this_proj -> analysis[j] -> curves[k] ->
plot);
Callback declarations for main window.
Variable declarations for the curve layout edition window.
void set_curve_data_zero(int rid, int cid, int interv)
initialize curve data
void adjust_tool_model(int calc, int curve, gchar *string_path)
adjust the content of the tool box tree model
void save_curve_(int *interv, double datacurve[*interv], int *cid, int *rid)
save calculation results from Fortran90
void erase_curves(project *this_proj, int c)
free all curve(s) data
double scale(double axe)
find appropriate major tick spacing based on axis length
void prep_plot(Curve *this_curve)
prepare curve plot (setting up variables for the plot)
void hide_curves(project *this_proj, int c)
for project hide all curves for a calculation
Curve * get_curve_from_pointer(gpointer data)
get Curve pointer from pointer
curve_dash * selectdash(int iddash)
setup dash pointer
void update_curve(gpointer data)
update curve rendering
void clean_this_curve_window(int cid, int rid)
free curve window data
void remove_this_curve_from_extras(int a, int b, int c)
free all target (a,b,c) curve from other curve(s) extra(s)
void update_curves()
update all curve(s) rendering for all project(s) in the workspace
Variable declarations for the curve widget Functions for interactions with the curve widget.
void remove_extra(ExtraSets *sets, CurveExtra *ctmp)
remove data from extra set(s)
void autoscale_axis(project *this_proj, Curve *this_curve, int rid, int cid, int aid)
autoscale axis
double * duplicate_double(int num, double *old_val)
copy a list of double
double * allocdouble(int val)
allocate a double * pointer
Global variable declarations Global convenience function declarations Global data structure defin...
gboolean is_the_widget_visible(GtkWidget *widg)
test if a GtkWidget exist, then return if it is visible or not
void hide_the_widgets(GtkWidget *widg)
hide GtkWidget
project * get_project_by_id(int p)
get project pointer using id number
Messaging function declarations.
Function declarations for reading atomes project file Function declarations for saving atomes proje...