dat_nexus.f: when nxdetector is given, accept also nxpsd

This commit is contained in:
2024-04-24 10:40:19 +02:00
parent b252eec827
commit 03676fbe12

View File

@ -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