Skip to content

Commit

Permalink
Merge pull request #1687 from willend/nexus-take2
Browse files Browse the repository at this point in the history
Addition of instrument geometry information to NeXus -> toward "Scipp-friendly NeXus" from McStas
  • Loading branch information
willend authored Sep 4, 2024
2 parents bcdb83b + 6666d09 commit edf589c
Show file tree
Hide file tree
Showing 29 changed files with 947 additions and 350 deletions.
1 change: 1 addition & 0 deletions buildscripts/build_loc_3.x_mac
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ source $CONDALOCATION/bin/activate
./mkdist mcstas 3.x-dev "" "" mac "" -- justinst
./mkdist mcstas-comps 3.x-dev "" "" mac "" -- justinst
./mkdist mcstas-tools-python-mcrun 3.x-dev tools/Python/mcrun/ "" mac "" -- justinst
./mkdist mcstas-tools-python-mctest 3.x-dev tools/Python/mctest/ "" mac "" -- justinst
./mkdist mcstas-tools-python-mcdoc 3.x-dev tools/Python/mcdoc/ "" mac "" -- justinst
./mkdist mcstas-tools-python-mcgui 3.x-dev tools/Python/mcgui/ "" mac "" -- justinst
./mkdist mcstas-tools-python-mccodelib 3.x-dev tools/Python/mccodelib/ "" mac "" -- justinst
Expand Down
30 changes: 0 additions & 30 deletions buildscripts/build_loc_mcx_2x_mac.sh

This file was deleted.

75 changes: 0 additions & 75 deletions buildscripts/build_loc_mcx_3x_mac.sh

This file was deleted.

6 changes: 5 additions & 1 deletion common/lib/share/interoff-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ int off_clip_3D_mod(intersection* t, Coords a, Coords b,
pol.npol = faceArray[i]; //nb vertex of polygon
pol.p = popol;
pol.normal= coords_set(0,0,1);
pol.D = 1;
unsigned long indVertP1=faceArray[++i]; //polygon's first vertex index in vtxTable
int j=1;
/*check whether vertex is left or right of plane*/
Expand Down Expand Up @@ -801,6 +802,7 @@ long off_init( char *offfile, double xwidth, double yheight, double zdepth,
polygon p;
p.p =vertices;
p.npol=nbVertex;
p.D=1;
off_normal(&(p.normal),p);

normalArray[indNormal]=p.normal;
Expand Down Expand Up @@ -1264,13 +1266,15 @@ void off_display(off_struct data)
cmz /= nbVertex;

char pixelinfo[1024];
char pixelinfotmp[1024];
sprintf(pixelinfo, "%li,%li,%li,%i,%g,%g,%g,%g,%g,%g", data.mantidoffset+pixel, data.mantidoffset, data.mantidoffset+data.polySize-1, nbVertex, cmx, cmy, cmz, x1-cmx, y1-cmy, z1-cmz);
for (j=2; j<=nbVertex; j++) {
double x2,y2,z2;
x2 = data.vtxArray[data.faceArray[i+j]].x;
y2 = data.vtxArray[data.faceArray[i+j]].y;
z2 = data.vtxArray[data.faceArray[i+j]].z;
sprintf(pixelinfo, "%s,%g,%g,%g", pixelinfo, x2-cmx, y2-cmy, z2-cmz);
sprintf(pixelinfotmp, "%s,%g,%g,%g", pixelinfo, x2-cmx, y2-cmy, z2-cmz);
sprintf(pixelinfo,"%s",pixelinfotmp);
if (ratio > 1 || drawthis) {
mcdis_line(x1,y1,z1,x2,y2,z2);
}
Expand Down
Loading

0 comments on commit edf589c

Please sign in to comment.