From 03676fbe12e2695bee1a20881cf2e06f19299c5c Mon Sep 17 00:00:00 2001 From: zolliker Date: Wed, 24 Apr 2024 10:40:19 +0200 Subject: [PATCH] dat_nexus.f: when nxdetector is given, accept also nxpsd --- gen/dat_nexus.f | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gen/dat_nexus.f b/gen/dat_nexus.f index 8055596..a88e0a9 100644 --- a/gen/dat_nexus.f +++ b/gen/dat_nexus.f @@ -224,12 +224,14 @@ c assume that we can open the HDF file, even when it is opened already by Fortra if (instr .eq. 'D') then ! dmc call str_trim(ins, '/nxentry/dmc/', li) - call str_trim(cnt, ins(1:li)//'nxpsd/', lc) +! this will also match NXpsd! + call str_trim(cnt, ins(1:li)//'nxdetector/', lc) xaxis='two_theta' axis1=cnt(1:lc)//'two_theta' signal=cnt(1:lc)//'counts' else if (instr .eq. 'H') then ! hrpt call str_trim(ins, '/nxentry/hrpt/', li) +! this will also match NXpsd! call str_trim(cnt, ins(1:li)//'nxdetector/', lc) xaxis='two_theta' axis1=cnt(1:lc)//'two_theta' @@ -653,6 +655,7 @@ c assume that we can open the HDF file, even when it is opened already by Fortra character attr*64, nam*64, clss*64, low*64 integer i, j, atype, l + logical isdet integer start0(32)/32*0/ real*8 dvalue @@ -706,6 +709,7 @@ c assume that we can open the HDF file, even when it is opened already by Fortra end_of_path=.true. endif call str_lowcase(low, datapath(lp+1:lp+i)) + isdet = low .eq. 'nxdetector' status=NXinitgroupdir(fileid) if (status .ne. NX_ok) RETURN 11 status=NXgetnextentry(fileid, name, class, type) @@ -713,6 +717,7 @@ c assume that we can open the HDF file, even when it is opened already by Fortra call str_lowcase(nam, name) call str_lowcase(clss, class) if (nam .eq. low .or. clss .eq. low) goto 12 + if (isdet .and. clss .eq. 'nxpsd') goto 12 if (low .eq. '*') then if (nam .eq. xaxis) then axis1=datapath(1:lp)//name