Skip to content

Commit e86c6ff

Browse files
committed
Add options
1 parent 471cf6a commit e86c6ff

File tree

1 file changed

+113
-6
lines changed

1 file changed

+113
-6
lines changed

doc/manual/pdfmorph.texinfo

Lines changed: 113 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ diffpy-dev@@googlegroups.com.
164164
@section Requirements
165165
@cindex requirements
166166

167-
@code{PDFmorph} is currently run from the command line, so it is recommended that users
168-
first familiarize themselves with their operating system's command line interface.
167+
@code{PDFmorph} is currently run from the command-line, so it is recommended that users
168+
first familiarize themselves with their operating system's command-line interface.
169169

170170
@code{PDFmorph} currently requires Python 3.10 or higher to run. It also makes use of
171171
the following third party libraries:
@@ -186,7 +186,7 @@ procedure described in the following section (@ref{Installation instructions}).
186186
We recommend installing the package and its dependencies using conda.
187187
Miniconda, a minimal installer for conda, can be downloaded
188188
@url{https://docs.anaconda.com/free/miniconda/, here}.
189-
Once Miniconda is installed, run @code{conda} on the command line
189+
Once Miniconda is installed, run @code{conda} on the command-line
190190
to test that it has been installed properly.
191191

192192
To create and activate a conda environment to use @code{PDFmorph}, run the following command.
@@ -277,7 +277,7 @@ cd <PDFmorph_tutorial_directory>
277277
@item Download the @url{https://www.diffpy.org/diffpy.pdfmorph/tutorialfiles.html,
278278
quick start tutorial files @code{tutorialData.zip}}
279279
into your current directory and extract the files. After this is done,
280-
type @code{ls} in the command line to list your current directory contents
280+
type @code{ls} in the command-line to list your current directory contents
281281
and make sure there is a directory named @code{tutorialData}.
282282
@itemize
283283
@item The files in this dataset were collected by Soham Banerjee at Brookhaven National Laboratory in Upton,
@@ -297,7 +297,7 @@ find the data labeled @code{darkSub_rh20_C_##.gr} within this directory.
297297
for the PDF data (Linux Terminal Output).}
298298
@end float
299299
@item Let us try try using the @code{PDFmorph} program to plot two PDFs against each other.
300-
Type the following command into the command line
300+
Type the following command into the command-line
301301
@example
302302
pdfmorph darkSub_rh20_C_01.gr darkSub_rh20_C_44.gr
303303
@end example
@@ -669,7 +669,114 @@ In this section, we describe the following morphs:
669669
@chapter PDFmorph options
670670
@cindex pdfmorph options
671671

672-
672+
In this section we describe all the options available to use in the
673+
@code{PDFmorph} program. Without options, the @code{PDFmorph} program
674+
is run with the command
675+
@example
676+
pdfmorph <morphed_PDF> <target_PDF>
677+
@end example
678+
@noindent where morphs will be applied to the morphed PDF in attempt to minimize
679+
the residual with the target PDF.
680+
681+
@noindent @code{-h, --help}
682+
@* @indent Show a brief summary of all the options listed in this section.
683+
684+
@noindent @code{-V, --version}
685+
@* @indent Show the program version (does not run the program).
686+
687+
@noindent @code{-s NAME, --save=NAME}
688+
@* @indent Save the morphed PDF into a file named @code{NAME}. You can use
689+
@code{-} to save to @code{stdout} instead.
690+
When you have the @code{--multiple} tag enabled, multiple morphed PDFs are
691+
generated. Using this command with the @code{--multiple} tag will save all
692+
these morphs into a directory named @code{NAME} as well as a @code{.txt}
693+
file summary of refined morph parameters (if applicable) and @math{R_W}
694+
for each morph done. To specify names for each saved PDF file, use the
695+
@code{--save-names-file} option.
696+
697+
@noindent @code{-v, --verbose}
698+
@* @indent Increase the amount of information saved to the file(s) generated
699+
by @code{--save}. Without this option enabled, only the morphed PDF table will be
700+
saved (the table of @math{r} and corresponding @math{g(r)} values). When enabled,
701+
information about the input and refined morph parameters (when applicable) and
702+
the @math{R_W} and Pearson correlation coefficient will be saved as parameters
703+
above the PDF table.
704+
705+
@noindent @code{--rmin=RMIN}
706+
@* @indent The minimum @math{r}-value to use for PDF comparisons and manipulations.
707+
708+
@noindent @code{--rmax=RMAX}
709+
@* @indent The maximum @math{r}-value to use for PDF comparisons and manipulations.
710+
711+
@noindent @code{--pearson}
712+
@* @indent When enabled, refinement will seek only to maximize the Pearson correlation
713+
coefficient between the two PDFs.
714+
715+
@noindent @code{--addpearson}
716+
@* @indent When enabled, refinement will seek to both maximize the Pearson correlation
717+
coefficient and minimize the residual between the two PDFs.
718+
719+
@b{Manipulations}: These options select the manipulations (morphs) that are to be applied to
720+
the morphed PDF. The passed values will be refined unlesss specifically excluded with the
721+
@code{--apply} or @code{--exclude} options. If no morphs are selected, the morphed PDF will
722+
be unchanged and plotted against the target PDF.
723+
724+
@noindent @code{-a, --apply}
725+
@* @indent Apply the morph but do not refine the morph parameter value.
726+
When this is not enabled, @code{PDFmorph} will automatically refine the
727+
morph parameters.
728+
729+
@noindent @code{-x MORPH, --exclude=MORPH}
730+
@* @indent Do not refine the morph named @code{MORPH}. Note that the input @code{MORPH}
731+
must be lower case and match exactly the name of the morph option that you wish not to refine.
732+
For example, running
733+
@example
734+
pdfmorph <MORPHED> <TARGET> --scale=2 --smear=0.1 --exclude=scale
735+
@end example
736+
@noindent will scale the morphed PDF by exactly @math{2}, but will refine the
737+
parameter @math{0.1} for smear. However, @code{--exclude=Scale} will not stop
738+
@code{--scale=2} from being refined.
739+
740+
@noindent @code{--scale=SCALE}
741+
@* @indent Apply a scale factor @code{SCALE} to the function being plotted. For instance,
742+
scaling @math{g(r)} by @code{SCALE} will return @math{@code{SCALE}*g(r)}.
743+
744+
@noindent @code{--smear=SMEAR}
745+
@* @indent Smear the PDF peaks with a Gaussian of width (standard deviation) @math{|{@code{SMEAR}|}.
746+
This input can be negative, but will have the same effect as its absolute value. This function is designed
747+
only for use on PDFs. This operation assumes the RDF (see @section{Available morphs}) peaks are approximately
748+
Gaussian and works by converting the PDF to an RDF, convoluting a Gaussian of width @code{SMEAR} with the RDF,
749+
and converting back to the PDF. This conversion requires a parameter @code{BASELINESLOPE} which will be
750+
refined if not provided by the user in the @code{--slope} option.
751+
752+
@noindent @code{--stretch}
753+
@* @indent Stretch the function being plotted along the abscissa by a factor of @math{1 + @code{STRETCH}}.
754+
For example, if the original function is @math{g(r)}, the stretch returns @math{g(r/(1+@code{STRETCH}))}.
755+
The returned PDF will always only be defined between @code{RMIN} and @code{RMAX} (see @code{--rmin}
756+
and @code{--rmax}). The @code{STRETCH} coefficient must be larger than @math{-1} and values in the
757+
range @math{(-1, 0}} will compress the function and set the remaining portion of the function up to
758+
@code{RMAX} as zero.
759+
760+
@noindent @code{--slope=BASELINESLOPE}
761+
@* @indent The slope of the baseline used when applying the smear factor. If provided, it will not be refined.
762+
The equation @math{@code{BASELINESLOPE}=4 @pi r @rho_0 @gamma_0)} can be used if the atomic number density
763+
@math{@rho_0} and the nanoparticle form factor @math{@gamma_0} is known for the morphed PDF. Otherwise,
764+
do not include this slope and @code{PDFmorph} will automatically estimate it for you.
765+
766+
@noindent @code{}
767+
@* @indent
768+
769+
@noindent @code{}
770+
@* @indent
771+
772+
@noindent @code{}
773+
@* @indent
774+
775+
@noindent @code{}
776+
@* @indent
777+
778+
@noindent @code{}
779+
@* @indent
673780

674781
@c End TexInfo file
675782
@node Index, Top

0 commit comments

Comments
 (0)