@@ -27,12 +27,16 @@ def pdfmorph(file1, file2, **kwargs):
2727 file2: str
2828 Path-like object to the target file.
2929 kwargs: dict
30- See the PDFmorph manual for options.
30+ See the PDFmorph manual for options. Multiple morphs not supported.
3131
3232 Returns
3333 -------
3434 dict:
3535 Summary of morphs.
36+ x: array-like
37+ The r grid after the morph is applied.
38+ y: array-like
39+ The g(r) values after the morph is applied.
3640 """
3741
3842 parser = create_option_parser ()
@@ -44,64 +48,4 @@ def pdfmorph(file1, file2, **kwargs):
4448 (opts , pargs ) = parser .parse_args (inputs )
4549 pargs = [file1 , file2 ]
4650
47- return single_morph (parser , opts , pargs )
48-
49-
50- def pdfmorph_multiple_targets (file , dir , ** kwargs ):
51- """Run PDFmorph with multiple targets at Python level.
52-
53- Parameters
54- ----------
55- file1: str
56- Path-like object to the file to be morphed.
57- file2: str
58- Path-like object to the target file.
59- kwargs: dict
60- See the PDFmorph manual for options.
61-
62- Returns
63- -------
64- dict:
65- Summary of morphs.
66- """
67-
68- parser = create_option_parser ()
69-
70- inputs = []
71- for key , value in kwargs .items ():
72- inputs .append (f"--{ key } " )
73- inputs .append (f"{ value } " )
74- (opts , pargs ) = parser .parse_args (inputs )
75- pargs = [file , dir ]
76-
77- return multiple_targets (parser , opts , pargs )
78-
79-
80- def pdfmorph_multiple_morphs (dir , file , ** kwargs ):
81- """Run PDFmorph for multiple morphs at Python level.
82-
83- Parameters
84- ----------
85- file1: str
86- Path-like object to the file to be morphed.
87- file2: str
88- Path-like object to the target file.
89- kwargs: dict
90- See the PDFmorph manual for options.
91-
92- Returns
93- -------
94- dict:
95- Summary of morphs.
96- """
97-
98- parser = create_option_parser ()
99-
100- inputs = []
101- for key , value in kwargs .items ():
102- inputs .append (f"--{ key } " )
103- inputs .append (f"{ value } " )
104- (opts , pargs ) = parser .parse_args (inputs )
105- pargs = [dir , file ]
106-
107- return multiple_morphs (parser , opts , pargs )
51+ return single_morph (parser , opts , pargs , return_morph = True )
0 commit comments