@@ -59,6 +59,7 @@ def load_data(filename, index=0):
5959 except ImportError as ie :
6060 raise ImportError (f"{ ie .name } is not available. Add sasdata to the python path." )
6161 loader = Loader ()
62+ filename = str (filename ) # In case a Path was given.
6263 # Allow for one part in multipart file
6364 if '[' in filename :
6465 filename , indexstr = filename [:- 1 ].split ('[' )
@@ -344,10 +345,14 @@ def empty_data1D(q, resolution=0.0, L=0., dL=0.):
344345 r"""
345346 Create empty 1D data using the given *q* as the x value.
346347
347- rms *resolution* $\Delta q/q$ defaults to 0%. If wavelength *L* and rms
348- wavelength divergence *dL* are defined, then *resolution* defines
349- rms $\Delta \theta/\theta$ for the lowest *q*, with $\theta$ derived from
350- $q = 4\pi/\lambda \sin(\theta)$.
348+ rms *resolution* $\Delta q/q$ defaults to 0.0. Note that this is
349+ expressed as a fraction rather than a percentage.
350+
351+ If wavelength *L* and rms wavelength divergence *dL* are given, then
352+ angle *theta* is infered from $q = 4\pi/\lambda \sin(\theta)$, and
353+ the *resolution* term applies to rms $\Delta \theta/\theta$ instead
354+ of $\Delta q/q$. Resolution $\Delta q$ is then calculated from wavelength
355+ and angular resolution.
351356 """
352357
353358 #Iq = 100 * np.ones_like(q)
@@ -378,7 +383,7 @@ def empty_data2D(qx, qy=None, resolution=0.0):
378383
379384 If *qy* is missing, create a square mesh with *qy=qx*.
380385
381- *resolution* dq/q defaults to 5% .
386+ *resolution* dq/q defaults to 0.0 .
382387 """
383388 if qy is None :
384389 qy = qx
0 commit comments