diff --git a/doc/source/api/diffpy.utils.parsers.rst b/doc/source/api/diffpy.utils.parsers.rst index 0709cf3a..3456f24e 100644 --- a/doc/source/api/diffpy.utils.parsers.rst +++ b/doc/source/api/diffpy.utils.parsers.rst @@ -11,10 +11,10 @@ diffpy.utils.parsers package Submodules ---------- -diffpy.utils.parsers.resample module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +diffpy.utils.parsers.serialization module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. automodule:: diffpy.utils.parsers.resample +.. automodule:: diffpy.utils.parsers.serialization :members: :undoc-members: :show-inheritance: @@ -34,11 +34,3 @@ diffpy.utils.parsers.custom_exceptions module :members: :undoc-members: :show-inheritance: - -diffpy.utils.parsers.serialization module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: diffpy.utils.parsers.serialization - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.utils.rst b/doc/source/api/diffpy.utils.rst index cf69f596..b873c333 100644 --- a/doc/source/api/diffpy.utils.rst +++ b/doc/source/api/diffpy.utils.rst @@ -28,3 +28,11 @@ diffpy.utils.tools module :members: :undoc-members: :show-inheritance: + +diffpy.utils.resampler module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.utils.resampler + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/diffpy.utils.scattering_objects.rst b/doc/source/api/diffpy.utils.scattering_objects.rst index fe511bf5..4607ad98 100644 --- a/doc/source/api/diffpy.utils.scattering_objects.rst +++ b/doc/source/api/diffpy.utils.scattering_objects.rst @@ -11,18 +11,18 @@ diffpy.utils.scattering_objects package Submodules ---------- -diffpy.utils.scattering_objects.user_config module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +diffpy.utils.scattering_objects.diffraction_objects module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. automodule:: diffpy.utils.scattering_objects.user_config +.. automodule:: diffpy.utils.scattering_objects.diffraction_objects :members: :undoc-members: :show-inheritance: -diffpy.utils.scattering_objects.diffraction_objects module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +diffpy.utils.scattering_objects.user_config module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. automodule:: diffpy.utils.scattering_objects.diffraction_objects +.. automodule:: diffpy.utils.scattering_objects.user_config :members: :undoc-members: :show-inheritance: diff --git a/doc/source/examples/parsersexample.rst b/doc/source/examples/parsersexample.rst index 90605741..b709de60 100644 --- a/doc/source/examples/parsersexample.rst +++ b/doc/source/examples/parsersexample.rst @@ -14,7 +14,7 @@ Using the parsers module, we can load file data into simple and easy-to-work-wit 2) To get the data table, we will use the ``loadData`` function. The default behavior of this function is to find and extract a data table from a file.:: - from diffpy.utils.parsers import loadData + from diffpy.utils.parsers.loaddata import loadData data_table = loadData('') While this will work with most datasets, on our ``data.txt`` file, we got a ``ValueError``. The reason for this is @@ -53,7 +53,7 @@ Using the parsers module, we can load file data into simple and easy-to-work-wit 4) Rather than working with separate ``data_table`` and ``hdata`` objects, it may be easier to combine them into a single dictionary. We can do so using the ``serialize_data`` function. :: - from diffpy.utils.parsers import serialize_data + from diffpy.utils.parsers.loaddata import serialize_data file_data = serialize_data('') 6) Finally, ``serialize_data`` allows us to store data from multiple text file in a single serial file. For one last bit diff --git a/doc/source/examples/resampleexample.rst b/doc/source/examples/resampleexample.rst index efa3c474..f7ba5e18 100644 --- a/doc/source/examples/resampleexample.rst +++ b/doc/source/examples/resampleexample.rst @@ -15,14 +15,14 @@ given enough datapoints. `_. :: - from diffpy.utils.parsers import loadData + from diffpy.utils.parsers.loaddata import loadData nickel_datatable = loadData('') nitarget_datatable = loadData('') Each data table has two columns: first is the grid and second is the function value. To extract the columns, we can utilize the serialize function ... :: - from diffpy.utils.parsers import serialize_data + from diffpy.utils.parsers.serialization import serialize_data nickel_data = serialize_data('Nickel.gr', {}, nickel_datatable, dt_colnames=['grid', 'func']) nickel_grid = nickel_data['Nickel.gr']['grid'] nickel_func = nickel_data['Nickel.gr']['func'] @@ -54,7 +54,7 @@ given enough datapoints. ... and use the diffpy.utils ``wsinterp`` function to resample on this grid.:: - from diffpy.utils.parsers import wsinterp + from diffpy.utils.resampler import wsinterp nickel_resample = wsinterp(grid, nickel_grid, nickel_func) target_resample = wsinterp(grid, target_grid, target_func) diff --git a/doc/source/utilities/parsersutility.rst b/doc/source/utilities/parsersutility.rst index f653c3d7..ffaf768e 100644 --- a/doc/source/utilities/parsersutility.rst +++ b/doc/source/utilities/parsersutility.rst @@ -5,7 +5,7 @@ Parsers Utility The ``diffpy.utils.parsers`` module allows users to easily and robustly load file data into a Python project. -- ``loadData()``: Find and load a data table/block from a text file. This seems to work for most datafiles +- ``loaddata.loadData()``: Find and load a data table/block from a text file. This seems to work for most datafiles including those generated by diffpy programs. Running only ``numpy.loadtxt`` will result in errors for most these files as there is often excess data or parameters stored above the data block. Users can instead choose to load all the parameters of the form `` = `` into a dictionary @@ -14,10 +14,10 @@ The ``diffpy.utils.parsers`` module allows users to easily and robustly load fil The program identifies data blocks as the first matrix block with a constant number of columns. A user can tune the minimum number of rows this matrix block must have. -- ``deserialize_data()``: Load data from a serial file format into a Python dictionary. Currently, the only supported +- ``serialization.deserialize_data()``: Load data from a serial file format into a Python dictionary. Currently, the only supported serial format is ``.json``. -- ``serialize_data()``: Serialize the data generated by ``loadData()`` into a serial file format. Currently, the only +- ``serialization.serialize_data()``: Serialize the data generated by ``loadData()`` into a serial file format. Currently, the only supported serial format is ``.json``. For a more in-depth tutorial for how to use these parser utilities, click :ref:`here `. diff --git a/news/doc-update.rst b/news/doc-update.rst new file mode 100644 index 00000000..1993a616 --- /dev/null +++ b/news/doc-update.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* Paths in our documentation reflect changes made in code. + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +*