aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-11-15 15:31:13 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:40 +0100
commit3c896e8741763b66fa056d6c8d79557225e66ad2 (patch)
treeffbb4fa21e6d9e0a7f65d5939ac2d48c9f2beb91
parent8557420ba0f50abdc1bf6245401fcd2566678f72 (diff)
Remove render_hkl --povray and remenants of cubeit
-rw-r--r--Makefile.am18
-rw-r--r--Makefile.in34
-rwxr-xr-xconfigure16
-rw-r--r--configure.ac3
-rw-r--r--src/povray.c354
-rw-r--r--src/povray.h27
-rw-r--r--src/render_hkl.c27
7 files changed, 35 insertions, 444 deletions
diff --git a/Makefile.am b/Makefile.am
index 598b8ee0..5e7d8d19 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,9 +3,8 @@ SUBDIRS = lib doc/reference libcrystfel
ACLOCAL_AMFLAGS = -I m4
bin_PROGRAMS = src/pattern_sim src/process_hkl src/get_hkl src/indexamajig \
- src/compare_hkl src/powder_plot src/render_hkl \
- src/calibrate_detector src/partialator \
- src/check_hkl src/partial_sim
+ src/compare_hkl src/powder_plot src/calibrate_detector \
+ src/partialator src/check_hkl src/partial_sim
noinst_PROGRAMS = tests/list_check tests/integration_check \
tests/pr_gradient_check tests/symmetry_check
@@ -24,6 +23,10 @@ if BUILD_HDFSEE
bin_PROGRAMS += src/hdfsee
endif
+if HAVE_CAIRO
+bin_PROGRAMS += src/render_hkl
+endif
+
AM_CFLAGS = -Wall
AM_CPPFLAGS = -DDATADIR=\""$(datadir)"\" -I$(top_builddir)/lib
AM_CPPFLAGS += -I$(top_srcdir)/lib
@@ -56,7 +59,9 @@ src_check_hkl_SOURCES = src/check_hkl.c
src_powder_plot_SOURCES = src/powder_plot.c
-src_render_hkl_SOURCES = src/render_hkl.c src/povray.c
+if HAVE_CAIRO
+src_render_hkl_SOURCES = src/render_hkl.c
+endif
src_calibrate_detector_SOURCES = src/calibrate_detector.c
@@ -79,9 +84,8 @@ tests_pr_gradient_check_SOURCES = tests/pr_gradient_check.c \
INCLUDES = -I$(top_srcdir)/libcrystfel/src -I$(top_srcdir)/data
-EXTRA_DIST += src/dw-hdfsee.h src/hdfsee.h src/povray.h \
- src/render_hkl.h src/post-refinement.h src/hrs-scaling.h \
- src/scaling-report.h
+EXTRA_DIST += src/dw-hdfsee.h src/hdfsee.h src/render_hkl.h \
+ src/post-refinement.h src/hrs-scaling.h src/scaling-report.h
crystfeldir = $(datadir)/crystfel
crystfel_DATA = data/diffraction.cl data/defs.h data/hdfsee.ui
diff --git a/Makefile.in b/Makefile.in
index 77193584..a1d869fc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -38,22 +38,23 @@ host_triplet = @host@
bin_PROGRAMS = src/pattern_sim$(EXEEXT) src/process_hkl$(EXEEXT) \
src/get_hkl$(EXEEXT) src/indexamajig$(EXEEXT) \
src/compare_hkl$(EXEEXT) src/powder_plot$(EXEEXT) \
- src/render_hkl$(EXEEXT) src/calibrate_detector$(EXEEXT) \
- src/partialator$(EXEEXT) src/check_hkl$(EXEEXT) \
- src/partial_sim$(EXEEXT) $(am__EXEEXT_1)
+ src/calibrate_detector$(EXEEXT) src/partialator$(EXEEXT) \
+ src/check_hkl$(EXEEXT) src/partial_sim$(EXEEXT) \
+ $(am__EXEEXT_1) $(am__EXEEXT_2)
noinst_PROGRAMS = tests/list_check$(EXEEXT) \
tests/integration_check$(EXEEXT) \
tests/pr_gradient_check$(EXEEXT) tests/symmetry_check$(EXEEXT) \
- $(am__EXEEXT_2)
+ $(am__EXEEXT_3)
TESTS = tests/list_check$(EXEEXT) tests/first_merge_check \
tests/second_merge_check tests/third_merge_check \
tests/fourth_merge_check tests/integration_check$(EXEEXT) \
tests/pr_gradient_check$(EXEEXT) tests/symmetry_check$(EXEEXT) \
- $(am__EXEEXT_2)
+ $(am__EXEEXT_3)
@BUILD_HDFSEE_TRUE@am__append_1 = src/hdfsee
-@HAVE_OPENCL_TRUE@am__append_2 = tests/gpu_sim_check
+@HAVE_CAIRO_TRUE@am__append_2 = src/render_hkl
@HAVE_OPENCL_TRUE@am__append_3 = tests/gpu_sim_check
-@HAVE_CAIRO_TRUE@am__append_4 = src/scaling-report.c
+@HAVE_OPENCL_TRUE@am__append_4 = tests/gpu_sim_check
+@HAVE_CAIRO_TRUE@am__append_5 = src/scaling-report.c
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
@@ -84,10 +85,11 @@ CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
@BUILD_HDFSEE_TRUE@am__EXEEXT_1 = src/hdfsee$(EXEEXT)
+@HAVE_CAIRO_TRUE@am__EXEEXT_2 = src/render_hkl$(EXEEXT)
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
"$(DESTDIR)$(crystfeldir)" "$(DESTDIR)$(crystfeldocdir)" \
"$(DESTDIR)$(scriptdir)"
-@HAVE_OPENCL_TRUE@am__EXEEXT_2 = tests/gpu_sim_check$(EXEEXT)
+@HAVE_OPENCL_TRUE@am__EXEEXT_3 = tests/gpu_sim_check$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
am__dirstamp = $(am__leading_dot)dirstamp
am_src_calibrate_detector_OBJECTS = src/calibrate_detector.$(OBJEXT)
@@ -155,8 +157,8 @@ src_process_hkl_OBJECTS = $(am_src_process_hkl_OBJECTS)
src_process_hkl_LDADD = $(LDADD)
src_process_hkl_DEPENDENCIES = $(top_builddir)/lib/libgnu.a \
$(top_builddir)/libcrystfel/libcrystfel.la
-am_src_render_hkl_OBJECTS = src/render_hkl.$(OBJEXT) \
- src/povray.$(OBJEXT)
+am__src_render_hkl_SOURCES_DIST = src/render_hkl.c
+@HAVE_CAIRO_TRUE@am_src_render_hkl_OBJECTS = src/render_hkl.$(OBJEXT)
src_render_hkl_OBJECTS = $(am_src_render_hkl_OBJECTS)
src_render_hkl_LDADD = $(LDADD)
src_render_hkl_DEPENDENCIES = $(top_builddir)/lib/libgnu.a \
@@ -235,7 +237,7 @@ DIST_SOURCES = $(src_calibrate_detector_SOURCES) \
$(src_indexamajig_SOURCES) $(src_partial_sim_SOURCES) \
$(am__src_partialator_SOURCES_DIST) $(src_pattern_sim_SOURCES) \
$(src_powder_plot_SOURCES) $(src_process_hkl_SOURCES) \
- $(src_render_hkl_SOURCES) \
+ $(am__src_render_hkl_SOURCES_DIST) \
$(am__tests_gpu_sim_check_SOURCES_DIST) \
$(tests_integration_check_SOURCES) $(tests_list_check_SOURCES) \
$(tests_pr_gradient_check_SOURCES) \
@@ -541,7 +543,7 @@ EXTRA_DIST = configure m4/gnulib-cache.m4 tests/first_merge_check \
tests/second_merge_check tests/third_merge_check \
tests/fourth_merge_check tests/first_merge_check.hkl \
tests/third_merge_check.hkl tests/fourth_merge_check.hkl \
- src/dw-hdfsee.h src/hdfsee.h src/povray.h src/render_hkl.h \
+ src/dw-hdfsee.h src/hdfsee.h src/render_hkl.h \
src/post-refinement.h src/hrs-scaling.h src/scaling-report.h \
$(crystfel_DATA) doc/twin-calculator.pdf \
doc/examples/lcls-dec.geom \
@@ -574,10 +576,10 @@ src_get_hkl_SOURCES = src/get_hkl.c
src_compare_hkl_SOURCES = src/compare_hkl.c
src_check_hkl_SOURCES = src/check_hkl.c
src_powder_plot_SOURCES = src/powder_plot.c
-src_render_hkl_SOURCES = src/render_hkl.c src/povray.c
+@HAVE_CAIRO_TRUE@src_render_hkl_SOURCES = src/render_hkl.c
src_calibrate_detector_SOURCES = src/calibrate_detector.c
src_partialator_SOURCES = src/partialator.c src/post-refinement.c \
- src/hrs-scaling.c $(am__append_4)
+ src/hrs-scaling.c $(am__append_5)
tests_list_check_SOURCES = tests/list_check.c
tests_integration_check_SOURCES = tests/integration_check.c
tests_symmetry_check_SOURCES = tests/symmetry_check.c
@@ -790,8 +792,6 @@ src/process_hkl$(EXEEXT): $(src_process_hkl_OBJECTS) $(src_process_hkl_DEPENDENC
$(AM_V_CCLD)$(LINK) $(src_process_hkl_OBJECTS) $(src_process_hkl_LDADD) $(LIBS)
src/render_hkl.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
-src/povray.$(OBJEXT): src/$(am__dirstamp) \
- src/$(DEPDIR)/$(am__dirstamp)
src/render_hkl$(EXEEXT): $(src_render_hkl_OBJECTS) $(src_render_hkl_DEPENDENCIES) src/$(am__dirstamp)
@rm -f src/render_hkl$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(src_render_hkl_OBJECTS) $(src_render_hkl_LDADD) $(LIBS)
@@ -841,7 +841,6 @@ mostlyclean-compile:
-rm -f src/partialator.$(OBJEXT)
-rm -f src/pattern_sim.$(OBJEXT)
-rm -f src/post-refinement.$(OBJEXT)
- -rm -f src/povray.$(OBJEXT)
-rm -f src/powder_plot.$(OBJEXT)
-rm -f src/process_hkl.$(OBJEXT)
-rm -f src/render_hkl.$(OBJEXT)
@@ -867,7 +866,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/partialator.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/pattern_sim.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/post-refinement.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/povray.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/powder_plot.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/process_hkl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/render_hkl.Po@am__quote@
diff --git a/configure b/configure
index 7689717f..2c68ae22 100755
--- a/configure
+++ b/configure
@@ -630,8 +630,6 @@ HAVE_FFTW_FALSE
HAVE_FFTW_TRUE
HAVE_CAIRO_FALSE
HAVE_CAIRO_TRUE
-BUILD_CUBEIT_FALSE
-BUILD_CUBEIT_TRUE
BUILD_HDFSEE_FALSE
BUILD_HDFSEE_TRUE
HAVE_OPENCL_FALSE
@@ -14001,16 +13999,6 @@ else
fi
- if test x$have_cairo = xtrue \
- -a x$have_libpng = xtrue; then
- BUILD_CUBEIT_TRUE=
- BUILD_CUBEIT_FALSE='#'
-else
- BUILD_CUBEIT_TRUE='#'
- BUILD_CUBEIT_FALSE=
-fi
-
-
if test x$have_cairo = xtrue; then
HAVE_CAIRO_TRUE=
HAVE_CAIRO_FALSE='#'
@@ -14487,10 +14475,6 @@ if test -z "${BUILD_HDFSEE_TRUE}" && test -z "${BUILD_HDFSEE_FALSE}"; then
as_fn_error $? "conditional \"BUILD_HDFSEE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${BUILD_CUBEIT_TRUE}" && test -z "${BUILD_CUBEIT_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CUBEIT\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${HAVE_CAIRO_TRUE}" && test -z "${HAVE_CAIRO_FALSE}"; then
as_fn_error $? "conditional \"HAVE_CAIRO\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/configure.ac b/configure.ac
index 35f1374e..1412eb7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -246,9 +246,6 @@ AM_CONDITIONAL([BUILD_HDFSEE], test x$have_gdk_pixbuf = xtrue \
-a "x$have_gtk" = "xtrue" \
-a "x$have_cairo" = "xtrue")
-AM_CONDITIONAL([BUILD_CUBEIT], test x$have_cairo = xtrue \
- -a x$have_libpng = xtrue)
-
AM_CONDITIONAL([HAVE_CAIRO], test x$have_cairo = xtrue)
AM_CONDITIONAL([HAVE_FFTW], test x$have_fftw = xtrue)
diff --git a/src/povray.c b/src/povray.c
deleted file mode 100644
index d20c18e5..00000000
--- a/src/povray.c
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * povray.c
- *
- * Invoke POV-ray
- *
- * (c) 2006-2010 Thomas White <taw@physics.org>
- *
- * Part of CrystFEL - crystallography with a FEL
- *
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-#include "cell.h"
-#include "utils.h"
-#include "symmetry.h"
-#include "render_hkl.h"
-#include "povray.h"
-
-
-#define MAX_PROC (256)
-
-
-int povray_render_animation(UnitCell *cell, RefList *list, unsigned int nproc,
- const SymOpList *sym, int wght, double boost,
- double scale_top)
-{
- FILE *fh;
- double asx, asy, asz;
- double bsx, bsy, bsz;
- double csx, csy, csz;
- pid_t pids[MAX_PROC];
- float max;
- int i;
- Reflection *refl;
- RefListIterator *iter;
- SymOpMask *m;
-
- if ( (nproc > MAX_PROC) || (nproc < 1) ) {
- ERROR("Number of processes must be a number between 1 and %i\n",
- MAX_PROC);
- return 1;
- }
-
- fh = fopen("render.pov", "w");
- fprintf(fh, "/* POV-Ray scene written by CrystFEL */\n\n");
- fprintf(fh, "#include \"colors.inc\"\n");
- fprintf(fh, "#include \"textures.inc\"\n\n");
- fprintf(fh, "global_settings {\n");
- fprintf(fh, " assumed_gamma 1.0\n");
- fprintf(fh, " ambient_light 5.0\n");
- fprintf(fh, "}\n\n");
-
- /* First quarter */
- fprintf(fh, "#if ( (clock >= 0) & (clock <= 124) )\n");
- fprintf(fh, "camera { location <0.0, -3.0, 0.0>"
- " sky z direction 1.1*y\n"
- " right -x*(image_width/image_height)\n"
- " look_at <0.0, 0.0, 0.0> }\n\n");
- fprintf(fh, "#end\n");
-
- /* Second quarter */
- fprintf(fh, "#if ( (clock >= 125) & (clock <= 249) )\n");
- fprintf(fh, "camera { location <0.0,"
- " -(2.0+cos(radians((clock-125)*(180/125)))), 0.0>"
- " sky z direction 1.1*y\n"
- " right -x*(image_width/image_height)\n"
- " look_at <0.0, 0.0, 0.0> }\n\n");
- fprintf(fh, "#end\n");
-
- /* Third quarter */
- fprintf(fh, "#if ( (clock >= 250) & (clock <= 374) )\n");
- fprintf(fh, "camera { location <0.0, -1.0, 0.0>"
- " sky z direction 1.1*y\n"
- " right -x*(image_width/image_height)\n"
- " look_at <0.0, 0.0, 0.0> }\n\n");
- fprintf(fh, "#end\n");
-
- /* Fourth quarter */
- fprintf(fh, "#if ( (clock >= 375) & (clock <= 500) )\n");
- fprintf(fh, "camera { location <0.0,"
- " -(2.0+cos(radians((clock-375)*(180/125)+180))), 0.0>"
- " sky z direction 1.1*y\n"
- " right -x*(image_width/image_height)\n"
- " look_at <0.0, 0.0, 0.0> }\n\n");
- fprintf(fh, "#end\n");
-
- fprintf(fh, "light_source { <-3.0 -3.0 3.0> White }\n");
- fprintf(fh, "light_source { <+3.0 -3.0 3.0> White }\n");
- fprintf(fh, "light_source { <0.0, -3.0, 0.0> 2*White }\n");
- fprintf(fh, "plane {z,-2.0 pigment { rgb <0.0, 0.0, 0.1> } }\n");
- fprintf(fh, "plane {-z,-2.0 pigment { rgb <0.0, 0.0, 0.05> } }\n\n");
-
- cell_get_reciprocal(cell, &asx, &asy, &asz,
- &bsx, &bsy, &bsz,
- &csx, &csy, &csz);
-
- fprintf(fh, "#declare WCA = (720/19);\n");
- fprintf(fh, "#declare WCL = (360/8.5);\n");
- fprintf(fh, "#declare TA = (4.875);\n");
- fprintf(fh, "#declare TB = (1.125);\n");
-
- fprintf(fh, "#declare TRANS = \n");
- fprintf(fh, "transform {\n");
-
- /* First half */
-
- /* Acceleration */
- fprintf(fh, "#if ( clock <= 24 )\n"
- "rotate <0, 0, 0.5*WCA*(clock/25)*(clock/25)>\n"
- "#end\n"
-
- /* Cruise */
- "#if ( (clock >= 25) & (clock <= 224) )\n"
- "rotate <0, 0, (WCA/2)+WCA*((clock-25)/25)>\n"
- "#end\n"
-
- /* Overlap */
-
- /* Deceleration */
- "#if ( (clock >= 225) & (clock <= 274) )\n"
- "rotate <0, 0, 360-WCA + WCA*((clock-225)/25) "
- " - 0.5*(WCA/2)*((clock-225)/25)*((clock-225)/25) >\n"
- "#end\n"
-
- /* Acceleration */
- "#if ( (clock >= 225) & (clock <= 274) )\n"
- "rotate <0.5*(WCL/2)*((clock-225)/25)*((clock-225)/25), 0, 0>\n"
- "#end\n"
-
- /* Second half */
-
- /* Cruise */
- "#if ( (clock >= 275) & (clock <= 396) )\n"
- "rotate <WCL + WCL*((clock-275)/25), 0, 0>\n"
- "#end\n"
-
- /* Deceleration to pause */
- "#if ( (clock >= 397) & (clock <= 421) )\n"
- "rotate <(1+TA)*WCL+ WCL*((clock-397)/25) "
- " - 0.5*WCL*((clock-397)/25)*((clock-397)/25), 0, 0 >\n"
- "#end\n"
-
- /* Acceleration after pause */
- "#if ( (clock >= 422) & (clock <= 446) )\n"
- "rotate <(1.5+TA)*WCL"
- " + 0.5*WCL*((clock-422)/25)*((clock-422)/25), 0, 0>\n"
- "#end\n"
-
- /* Final Cruise */
- "#if ( (clock >= 447) & (clock <= 474) )\n"
- "rotate <(2+TA)*WCL + WCL*((clock-447)/25), 0, 0>\n"
- "#end\n"
-
- /* Final Deceleration */
- "#if ( (clock >= 475) & (clock <= 499) )\n"
- "rotate <(2+TA+TB)*WCL + WCL*((clock-475)/25) "
- " - 0.5*WCL*((clock-475)/25)*((clock-475)/25), 0, 0 >\n"
- "#end\n");
-
- fprintf(fh, "}\n");
-
- m = new_symopmask(sym);
-
- max = 0.0;
- for ( refl = first_refl(list, &iter);
- refl != NULL;
- refl = next_refl(refl, iter) ) {
-
- float val;
- signed int h, k, l;
-
- get_indices(refl, &h, &k, &l);
- special_position(sym, m, h, k, l);
-
- switch ( wght ) {
- case WGHT_I :
- val = get_intensity(refl);
- break;
- case WGHT_SQRTI :
- val = get_intensity(refl);
- val = (val>0.0) ? sqrt(val) : 0.0;
- break;
- case WGHT_COUNTS :
- val = get_redundancy(refl);
- val /= (double)num_equivs(sym, m);
- break;
- case WGHT_RAWCOUNTS :
- val = get_redundancy(refl);
- break;
- default :
- ERROR("Invalid weighting.\n");
- abort();
- }
-
- if ( val > max ) max = val;
-
- }
- max /= boost;
-
- /* Use manual scale top if specified */
- if ( scale_top > 0.0 ) {
- max = scale_top;
- }
-
- for ( refl = first_refl(list, &iter);
- refl != NULL;
- refl = next_refl(refl, iter) ) {
-
- signed int h, k, l;float radius;
- int s;
- float val, p, r, g, b, trans;
- int j;
- int neq;
-
- get_indices(refl, &h, &k, &l);
- special_position(sym, m, h, k, l);
- neq = num_equivs(sym, m);
-
- switch ( wght ) {
- case WGHT_I :
- val = get_intensity(refl);
- break;
- case WGHT_SQRTI :
- val = get_intensity(refl);
- val = (val>0.0) ? sqrt(val) : 0.0;
- break;
- case WGHT_COUNTS :
- val = get_redundancy(refl);
- val /= (double)neq;
- break;
- case WGHT_RAWCOUNTS :
- val = get_redundancy(refl);
- break;
- default :
- ERROR("Invalid weighting.\n");
- abort();
- }
-
- s = val / (max/6);
- p = fmod(val, max/6);
- p /= (max/6);
-
- r = 0; g = 0; b = 0;
-
- if ( (val < 0.0) ) {
- s = 0;
- p = 1.0;
- }
- if ( (val > max) ) {
- s = 6;
- }
- switch ( s ) {
- case 0 : /* Black to blue */
- r = 0.0; g = 0.0; b = p;
- break;
- case 1 : /* Blue to green */
- r = 0.0; g = p; b = 1.0-p;
- break;
- case 2 : /* Green to red */
- r =p; g = 1.0-p; b = 0.0;
- break;
- case 3 : /* Red to Orange */
- r = 1.0; g = 0.5*p; b = 0.0;
- break;
- case 4 : /* Orange to Yellow */
- r = 1.0; g = 0.5 + 0.5*p; b = 0.0;
- break;
- case 5 : /* Yellow to White */
- r = 1.0; g = 1.0; b = 1.0*p;
- break;
- case 6 : /* Pixel has hit the maximum value */
- r = 1.0; g = 1.0; b = 1.0;
- break;
- }
-
- if ( val <= 0.0 ) continue;
- radius = 0.01 * pow(val, 0.25)/pow(max, 0.25);
- trans = 1.0-(val/max);
-
- /* For each equivalent */
- for ( j=0; j<neq; j++ ) {
-
- signed int he, ke, le;
- float x, y, z;
-
- get_equiv(sym, m, j, h, k, l, &he, &ke, &le);
-
- x = asx*he + bsx*ke + csx*le;
- y = asy*he + bsy*ke + csy*le;
- z = asz*he + bsz*ke + csz*le;
-
- fprintf(fh, "sphere { <%.5f, %.5f, %.5f>, %.5f "
- "texture{pigment{color rgb <%f, %f, %f>"
- " transmit %f} "
- "finish { reflection %f } } \n"
- "transform { TRANS }\n"
- "}\n",
- x/1e9, y/1e9, z/1e9, radius,
- r, g, b, trans, 0.1*(1.0-trans));
-
- }
-
- }
-
- free_symopmask(m);
-
- fprintf(fh, "\n");
- fclose(fh);
-
- for ( i=0; i<nproc; i++ ) {
-
- pids[i] = fork();
- if ( !( (pids[i] != 0) && (pids[i] != -1) ) ) {
- if ( pids[i] == -1 ) {
- ERROR("fork() failed.\n");
- } else {
-
- char minf[256];
- char maxf[256];
- float nf, xf, nsec;
-
- nsec = 500.0 / (float)nproc;
- nf = nsec * (float)i;
- xf = (nsec * (float)i + nsec) - 1.0;
-
- snprintf(minf, 255, "+SF%i", (int)nf);
- snprintf(maxf, 255, "+EF%i", (int)xf);
-
- /* Forked successfully, child process */
- execlp("povray", "", "+W1024", "+H768",
- "+Irender.pov", "+Orender.png",
- "+KFI0", "+KFF499", "+KI0", "+KF499",
- minf, maxf, "-D", NULL);
-
- }
- } /* else start the next one */
- }
-
- for ( i=0; i<nproc; i++ ) {
- int r;
- waitpid(pids[i], &r, 0);
- }
-
- return 0;
-}
diff --git a/src/povray.h b/src/povray.h
deleted file mode 100644
index f91c141c..00000000
--- a/src/povray.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * povray.h
- *
- * Invoke POV-ray
- *
- * (c) 2006-2011 Thomas White <taw@physics.org>
- *
- * Part of CrystFEL - crystallography with a FEL
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifndef POVRAY_H
-#define POVRAY_H
-
-#include "reflist.h"
-#include "cell.h"
-#include "symmetry.h"
-
-extern int povray_render_animation(UnitCell *cell, RefList *list,
- unsigned int nproc, const SymOpList *sym,
- int wght, double boost, double scale_top);
-
-#endif /* POVRAY_H */
diff --git a/src/render_hkl.c b/src/render_hkl.c
index 69791e4a..b37cc00b 100644
--- a/src/render_hkl.c
+++ b/src/render_hkl.c
@@ -26,7 +26,6 @@
#endif
#include "utils.h"
-#include "povray.h"
#include "symmetry.h"
#include "render.h"
#include "render_hkl.h"
@@ -41,12 +40,7 @@ static void show_help(const char *s)
{
printf("Syntax: %s [options] <file.hkl>\n\n", s);
printf(
-"Render intensity lists in various ways.\n"
-"\n"
-" --povray Render a 3D animation using POV-ray.\n"
-#ifdef HAVE_CAIRO
-" --zone-axis Render a 2D zone axis pattern.\n"
-#endif
+"Render intensity lists in 2D slices.\n"
"\n"
" -d, --down=<h>,<k>,<l> Indices for the axis in the downward direction.\n"
" Default: 1,0,0.\n"
@@ -565,7 +559,6 @@ int main(int argc, char *argv[])
UnitCell *cell;
RefList *list;
char *infile;
- int config_povray = 0;
int config_zoneaxis = 0;
int config_sqrt = 0;
int config_colkey = 0;
@@ -590,7 +583,6 @@ int main(int argc, char *argv[])
/* Long options */
const struct option longopts[] = {
{"help", 0, NULL, 'h'},
- {"povray", 0, &config_povray, 1},
{"zone-axis", 0, &config_zoneaxis, 1},
{"output", 1, NULL, 'o'},
{"pdb", 1, NULL, 'p'},
@@ -675,6 +667,11 @@ int main(int argc, char *argv[])
}
+ if ( config_zoneaxis ) {
+ ERROR("Friendly warning: The --zone-axis option isn't needed"
+ " any longer (I ignored it for you).\n");
+ }
+
if ( (pdb == NULL) && !config_colkey ) {
ERROR("You must specify the PDB containing the unit cell.\n");
return 1;
@@ -692,7 +689,6 @@ int main(int argc, char *argv[])
if ( outfile == NULL ) outfile = strdup("za.pdf");
-
if ( strcmp(weighting, "I") == 0 ) {
wght = WGHT_I;
} else if ( strcmp(weighting, "sqrtI") == 0 ) {
@@ -780,15 +776,8 @@ int main(int argc, char *argv[])
return 1;
}
- if ( config_povray ) {
- r = povray_render_animation(cell, list,
- nproc, sym, wght, boost, scale_top);
- } else if ( config_zoneaxis ) {
- render_za(cell, list, boost, sym, wght, colscale,
- rh, rk, rl, dh, dk, dl, outfile, scale_top);
- } else {
- ERROR("Try again with either --povray or --zone-axis.\n");
- }
+ render_za(cell, list, boost, sym, wght, colscale,
+ rh, rk, rl, dh, dk, dl, outfile, scale_top);
free(pdb);
free_symoplist(sym);