Skip to content

Commit bb998df

Browse files
committed
mirror SFPPylite
1 parent 0aa5374 commit bb998df

20 files changed

Lines changed: 1173 additions & 55 deletions

docs/SFPPy_classes_documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SFPPy Modules Documentation
22

3-
Generated on: **2025-03-22 18:34:41**
3+
Generated on: **2025-03-24 00:01:31**
44

55
<hr style="border: none; height: 1px; background-color: #e0e0e0;" />
66

docs/SFPPylite_demo.html

Lines changed: 1045 additions & 0 deletions
Large diffs are not rendered by default.

docs/class_examples.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ <h2>Welcome to Usage Class Examples</h2>
337337
<p>Select a module in the left menu to view usage examples. These examples are not for production and are automatically extracted from the main section of each module.</p>
338338
<p>Back to the <a href='index.html'>Python'SFPPy documentation</a>.</p>
339339
<p>When no module is selected, you see this welcome page. They are used to test classes with typical codes. The main section often serves as a testing script, example usage block, or self-contained test block. It's a way to demonstrate how the module's functionality works or to run simple unit tests and examples inline.</p>
340-
<p>Generated on: 2025-03-22 18:34:41</p>
340+
<p>Generated on: 2025-03-24 00:01:31</p>
341341

342342
</div>
343343

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ <h1 style="font-size: 1.8em; margin-bottom: 12px;">
434434
const markdownContent = `
435435
# SFPPy Modules Documentation
436436
437-
Generated on: **2025-03-22 18:34:41**
437+
Generated on: **2025-03-24 00:01:31**
438438
439439
<hr style="border: none; height: 1px; background-color: #e0e0e0;" />
440440

docs/index_matlab.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ <h2>Welcome to Pizza3 Matlab Documentation</h2>
255255
<p>Back to the <a href='index.html'>Python'Pizza3 documentation</a>.</p>
256256
<hr>
257257
<p><i>When no function is selected, you see this welcome page.</i></p>
258-
Generated on: 2025-03-22 18:35:58</div>
258+
Generated on: 2025-03-24 00:02:49</div>
259259
<div id='testcase' class='doc-content' style='display: none;'>
260260
<h1>reference system</h1>
261261
<button class="collapsible">Show MATLAB Code</button>

docs/patankar/food.html

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9671,24 +9671,33 @@ <h2 id="raises">Raises</h2>
96719671
&#34;&#34;&#34;Returns the rasterized image of the migrant&#34;&#34;&#34;
96729672
if self.image_file:
96739673
self._download_PNG() # download PNG if not cached
9674-
return Image.open(self.image_file)
9674+
if os.path.isfile(self.image_file):
9675+
return Image.open(self.image_file)
9676+
else:
9677+
print(f&#34;the expected file {self.image_file} does not exist&#34;)
96759678

96769679
# rawimage property
96779680
@property
96789681
def _rawimage(self):
96799682
&#34;&#34;&#34;returns the raw (binary) image of the migrant&#34;&#34;&#34;
96809683
if self.image_file:
9681-
with open(self.image_file, &#34;rb&#34;) as f:
9682-
image_bytes = f.read()
9683-
return image_bytes
9684+
if os.path.isfile(self.image_file):
9685+
with open(self.image_file, &#34;rb&#34;) as f:
9686+
image_bytes = f.read()
9687+
return image_bytes
9688+
else:
9689+
print(f&#34;the expected file {self.image_file} does not exist&#34;)
96849690

96859691
# structure
96869692
@property
96879693
def structure(self):
96889694
&#34;&#34;&#34;Returns the metadata associated with the migrant&#34;&#34;&#34;
96899695
if self.structure_file:
96909696
self._download_SDF() # download SDF if not cached
9691-
return parse_sdf(self.structure_file)
9697+
if os.path.isfile(self.structure_file):
9698+
return parse_sdf(self.structure_file)
9699+
else:
9700+
print(f&#34;the expected file {self.structure_file} does not exist&#34;)
96929701

96939702
# low-level model validator and property assignment
96949703
def _validate_and_set_model(self, prop, model, template, update_params,PropertyModel,PropertyModelValidator):
@@ -10429,7 +10438,10 @@ <h2 id="returns">Returns</h2>
1042910438
&#34;&#34;&#34;Returns the rasterized image of the migrant&#34;&#34;&#34;
1043010439
if self.image_file:
1043110440
self._download_PNG() # download PNG if not cached
10432-
return Image.open(self.image_file)</code></pre>
10441+
if os.path.isfile(self.image_file):
10442+
return Image.open(self.image_file)
10443+
else:
10444+
print(f&#34;the expected file {self.image_file} does not exist&#34;)</code></pre>
1043310445
</details>
1043410446
</dd>
1043510447
<dt id="food.migrant.keval"><code class="name">var <span class="ident">keval</span></code></dt>
@@ -10704,7 +10716,10 @@ <h2 id="example">Example</h2>
1070410716
&#34;&#34;&#34;Returns the metadata associated with the migrant&#34;&#34;&#34;
1070510717
if self.structure_file:
1070610718
self._download_SDF() # download SDF if not cached
10707-
return parse_sdf(self.structure_file)</code></pre>
10719+
if os.path.isfile(self.structure_file):
10720+
return parse_sdf(self.structure_file)
10721+
else:
10722+
print(f&#34;the expected file {self.structure_file} does not exist&#34;)</code></pre>
1070810723
</details>
1070910724
</dd>
1071010725
<dt id="food.migrant.volumeDwelle"><code class="name">var <span class="ident">volumeDwelle</span></code></dt>

docs/patankar/layer.html

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16121,24 +16121,33 @@ <h2 id="raises">Raises</h2>
1612116121
&#34;&#34;&#34;Returns the rasterized image of the migrant&#34;&#34;&#34;
1612216122
if self.image_file:
1612316123
self._download_PNG() # download PNG if not cached
16124-
return Image.open(self.image_file)
16124+
if os.path.isfile(self.image_file):
16125+
return Image.open(self.image_file)
16126+
else:
16127+
print(f&#34;the expected file {self.image_file} does not exist&#34;)
1612516128

1612616129
# rawimage property
1612716130
@property
1612816131
def _rawimage(self):
1612916132
&#34;&#34;&#34;returns the raw (binary) image of the migrant&#34;&#34;&#34;
1613016133
if self.image_file:
16131-
with open(self.image_file, &#34;rb&#34;) as f:
16132-
image_bytes = f.read()
16133-
return image_bytes
16134+
if os.path.isfile(self.image_file):
16135+
with open(self.image_file, &#34;rb&#34;) as f:
16136+
image_bytes = f.read()
16137+
return image_bytes
16138+
else:
16139+
print(f&#34;the expected file {self.image_file} does not exist&#34;)
1613416140

1613516141
# structure
1613616142
@property
1613716143
def structure(self):
1613816144
&#34;&#34;&#34;Returns the metadata associated with the migrant&#34;&#34;&#34;
1613916145
if self.structure_file:
1614016146
self._download_SDF() # download SDF if not cached
16141-
return parse_sdf(self.structure_file)
16147+
if os.path.isfile(self.structure_file):
16148+
return parse_sdf(self.structure_file)
16149+
else:
16150+
print(f&#34;the expected file {self.structure_file} does not exist&#34;)
1614216151

1614316152
# low-level model validator and property assignment
1614416153
def _validate_and_set_model(self, prop, model, template, update_params,PropertyModel,PropertyModelValidator):
@@ -16879,7 +16888,10 @@ <h2 id="returns">Returns</h2>
1687916888
&#34;&#34;&#34;Returns the rasterized image of the migrant&#34;&#34;&#34;
1688016889
if self.image_file:
1688116890
self._download_PNG() # download PNG if not cached
16882-
return Image.open(self.image_file)</code></pre>
16891+
if os.path.isfile(self.image_file):
16892+
return Image.open(self.image_file)
16893+
else:
16894+
print(f&#34;the expected file {self.image_file} does not exist&#34;)</code></pre>
1688316895
</details>
1688416896
</dd>
1688516897
<dt id="layer.migrant.keval"><code class="name">var <span class="ident">keval</span></code></dt>
@@ -17154,7 +17166,10 @@ <h2 id="example">Example</h2>
1715417166
&#34;&#34;&#34;Returns the metadata associated with the migrant&#34;&#34;&#34;
1715517167
if self.structure_file:
1715617168
self._download_SDF() # download SDF if not cached
17157-
return parse_sdf(self.structure_file)</code></pre>
17169+
if os.path.isfile(self.structure_file):
17170+
return parse_sdf(self.structure_file)
17171+
else:
17172+
print(f&#34;the expected file {self.structure_file} does not exist&#34;)</code></pre>
1715817173
</details>
1715917174
</dd>
1716017175
<dt id="layer.migrant.volumeDwelle"><code class="name">var <span class="ident">volumeDwelle</span></code></dt>

docs/patankar/loadpubchem.html

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,24 +1838,33 @@ <h2 id="version-history">Version History</h2>
18381838
&#34;&#34;&#34;Returns the rasterized image of the migrant&#34;&#34;&#34;
18391839
if self.image_file:
18401840
self._download_PNG() # download PNG if not cached
1841-
return Image.open(self.image_file)
1841+
if os.path.isfile(self.image_file):
1842+
return Image.open(self.image_file)
1843+
else:
1844+
print(f&#34;the expected file {self.image_file} does not exist&#34;)
18421845

18431846
# rawimage property
18441847
@property
18451848
def _rawimage(self):
18461849
&#34;&#34;&#34;returns the raw (binary) image of the migrant&#34;&#34;&#34;
18471850
if self.image_file:
1848-
with open(self.image_file, &#34;rb&#34;) as f:
1849-
image_bytes = f.read()
1850-
return image_bytes
1851+
if os.path.isfile(self.image_file):
1852+
with open(self.image_file, &#34;rb&#34;) as f:
1853+
image_bytes = f.read()
1854+
return image_bytes
1855+
else:
1856+
print(f&#34;the expected file {self.image_file} does not exist&#34;)
18511857

18521858
# structure
18531859
@property
18541860
def structure(self):
18551861
&#34;&#34;&#34;Returns the metadata associated with the migrant&#34;&#34;&#34;
18561862
if self.structure_file:
18571863
self._download_SDF() # download SDF if not cached
1858-
return parse_sdf(self.structure_file)
1864+
if os.path.isfile(self.structure_file):
1865+
return parse_sdf(self.structure_file)
1866+
else:
1867+
print(f&#34;the expected file {self.structure_file} does not exist&#34;)
18591868

18601869
# low-level model validator and property assignment
18611870
def _validate_and_set_model(self, prop, model, template, update_params,PropertyModel,PropertyModelValidator):
@@ -4604,24 +4613,33 @@ <h2 id="raises">Raises</h2>
46044613
&#34;&#34;&#34;Returns the rasterized image of the migrant&#34;&#34;&#34;
46054614
if self.image_file:
46064615
self._download_PNG() # download PNG if not cached
4607-
return Image.open(self.image_file)
4616+
if os.path.isfile(self.image_file):
4617+
return Image.open(self.image_file)
4618+
else:
4619+
print(f&#34;the expected file {self.image_file} does not exist&#34;)
46084620

46094621
# rawimage property
46104622
@property
46114623
def _rawimage(self):
46124624
&#34;&#34;&#34;returns the raw (binary) image of the migrant&#34;&#34;&#34;
46134625
if self.image_file:
4614-
with open(self.image_file, &#34;rb&#34;) as f:
4615-
image_bytes = f.read()
4616-
return image_bytes
4626+
if os.path.isfile(self.image_file):
4627+
with open(self.image_file, &#34;rb&#34;) as f:
4628+
image_bytes = f.read()
4629+
return image_bytes
4630+
else:
4631+
print(f&#34;the expected file {self.image_file} does not exist&#34;)
46174632

46184633
# structure
46194634
@property
46204635
def structure(self):
46214636
&#34;&#34;&#34;Returns the metadata associated with the migrant&#34;&#34;&#34;
46224637
if self.structure_file:
46234638
self._download_SDF() # download SDF if not cached
4624-
return parse_sdf(self.structure_file)
4639+
if os.path.isfile(self.structure_file):
4640+
return parse_sdf(self.structure_file)
4641+
else:
4642+
print(f&#34;the expected file {self.structure_file} does not exist&#34;)
46254643

46264644
# low-level model validator and property assignment
46274645
def _validate_and_set_model(self, prop, model, template, update_params,PropertyModel,PropertyModelValidator):
@@ -5362,7 +5380,10 @@ <h2 id="returns">Returns</h2>
53625380
&#34;&#34;&#34;Returns the rasterized image of the migrant&#34;&#34;&#34;
53635381
if self.image_file:
53645382
self._download_PNG() # download PNG if not cached
5365-
return Image.open(self.image_file)</code></pre>
5383+
if os.path.isfile(self.image_file):
5384+
return Image.open(self.image_file)
5385+
else:
5386+
print(f&#34;the expected file {self.image_file} does not exist&#34;)</code></pre>
53665387
</details>
53675388
</dd>
53685389
<dt id="loadpubchem.migrant.keval"><code class="name">var <span class="ident">keval</span></code></dt>
@@ -5637,7 +5658,10 @@ <h2 id="example">Example</h2>
56375658
&#34;&#34;&#34;Returns the metadata associated with the migrant&#34;&#34;&#34;
56385659
if self.structure_file:
56395660
self._download_SDF() # download SDF if not cached
5640-
return parse_sdf(self.structure_file)</code></pre>
5661+
if os.path.isfile(self.structure_file):
5662+
return parse_sdf(self.structure_file)
5663+
else:
5664+
print(f&#34;the expected file {self.structure_file} does not exist&#34;)</code></pre>
56415665
</details>
56425666
</dd>
56435667
<dt id="loadpubchem.migrant.volumeDwelle"><code class="name">var <span class="ident">volumeDwelle</span></code></dt>

docs/patankar/migration.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ <h2 id="example">Example</h2>
554554

555555
# Clean tex
556556
def cleantex(text,islatexavailable=_LaTeXavailable):
557-
&#34;&#34;&#34;
557+
r&#34;&#34;&#34;
558558
Process a LaTeX string to guess the plain text by performing substitutions
559559
and removing formatting characters, while preserving inner content as much as possible.
560560

@@ -3811,7 +3811,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
38113811
and removing formatting characters, while preserving inner content as much as possible.</p>
38123812
<p>Replacements performed:
38133813
- Replace '\,' with a space.
3814-
- Replace ' rac{num}{denom}' with 'num/denom'.
3814+
- Replace '\frac{num}{denom}' with 'num/denom'.
38153815
- Replace '\sum' with 'sum'.
38163816
- Replace '\int' with 'int'.</p>
38173817
<p>Afterwards, it removes:
@@ -3833,7 +3833,7 @@ <h2 id="returns">Returns</h2>
38333833
<span>Expand source code</span>
38343834
</summary>
38353835
<pre><code class="python">def cleantex(text,islatexavailable=_LaTeXavailable):
3836-
&#34;&#34;&#34;
3836+
r&#34;&#34;&#34;
38373837
Process a LaTeX string to guess the plain text by performing substitutions
38383838
and removing formatting characters, while preserving inner content as much as possible.
38393839

@@ -5062,7 +5062,7 @@ <h2 id="returns">Returns</h2>
50625062
</details>
50635063
</dd>
50645064
<dt id="migration.senspatankar"><code class="name flex">
5065-
<span>def <span class="ident">senspatankar</span></span>(<span>multilayer=None, medium=None, name='senspatantkar:77Sj7h', description='', t=None, autotime=True, timescale='sqrt', Cxprevious=None, ntimes=1000.0, RelTol=1e-06, AbsTol=1e-06, container=None)</span>
5065+
<span>def <span class="ident">senspatankar</span></span>(<span>multilayer=None, medium=None, name='senspatantkar:sKK2ur', description='', t=None, autotime=True, timescale='sqrt', Cxprevious=None, ntimes=1000.0, RelTol=1e-06, AbsTol=1e-06, container=None)</span>
50665066
</code></dt>
50675067
<dd>
50685068
<div class="desc"><p>Simulates in 1D the mass transfer of a substance initially distributed in a multilayer

docs/patankar/migration.html~

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ _LaTeXavailable = is_latex_available()
554554

555555
# Clean tex
556556
def cleantex(text,islatexavailable=_LaTeXavailable):
557-
&#34;&#34;&#34;
557+
r&#34;&#34;&#34;
558558
Process a LaTeX string to guess the plain text by performing substitutions
559559
and removing formatting characters, while preserving inner content as much as possible.
560560

@@ -3811,7 +3811,7 @@ if __name__ == &#39;__main__&#39;:
38113811
and removing formatting characters, while preserving inner content as much as possible.</p>
38123812
<p>Replacements performed:
38133813
- Replace '\,' with a space.
3814-
- Replace ' rac{num}{denom}' with 'num/denom'.
3814+
- Replace '\frac{num}{denom}' with 'num/denom'.
38153815
- Replace '\sum' with 'sum'.
38163816
- Replace '\int' with 'int'.</p>
38173817
<p>Afterwards, it removes:
@@ -3833,7 +3833,7 @@ and removing formatting characters, while preserving inner content as much as po
38333833
<span>Expand source code</span>
38343834
</summary>
38353835
<pre><code class="python">def cleantex(text,islatexavailable=_LaTeXavailable):
3836-
&#34;&#34;&#34;
3836+
r&#34;&#34;&#34;
38373837
Process a LaTeX string to guess the plain text by performing substitutions
38383838
and removing formatting characters, while preserving inner content as much as possible.
38393839

@@ -5062,7 +5062,7 @@ and a "Launch Simulation" button triggers the simulation, which computes:</p>
50625062
</details>
50635063
</dd>
50645064
<dt id="migration.senspatankar"><code class="name flex">
5065-
<span>def <span class="ident">senspatankar</span></span>(<span>multilayer=None, medium=None, name='senspatantkar:77Sj7h', description='', t=None, autotime=True, timescale='sqrt', Cxprevious=None, ntimes=1000.0, RelTol=1e-06, AbsTol=1e-06, container=None)</span>
5065+
<span>def <span class="ident">senspatankar</span></span>(<span>multilayer=None, medium=None, name='senspatantkar:sKK2ur', description='', t=None, autotime=True, timescale='sqrt', Cxprevious=None, ntimes=1000.0, RelTol=1e-06, AbsTol=1e-06, container=None)</span>
50665066
</code></dt>
50675067
<dd>
50685068
<div class="desc"><p>Simulates in 1D the mass transfer of a substance initially distributed in a multilayer

0 commit comments

Comments
 (0)