Skip to content

Commit

Permalink
add function doc
Browse files Browse the repository at this point in the history
  • Loading branch information
taoning committed Aug 23, 2024
1 parent 4460bf3 commit e8a5179
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
37 changes: 35 additions & 2 deletions pyradiance/px.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,21 @@ def pcomb(
expression: Optional[str] = None,
source: Optional[str] = None,
) -> bytes:
"""combine Radiance pictures and/or float matrices"""
"""combine Radiance pictures and/or float matrices
Args:
inputs: list of PcombInput
xres: horizontal resolution
yres: vertical resolution
inform: input data format. Default is "a" for ascii.
fout: if True, write output to file
header: if True, write header
expression: expression
source: source
Returns:
bytes: output of pcomb
"""
stdin = None
cmd = [str(BINPATH / "pcomb")]
if xres is not None:
Expand Down Expand Up @@ -321,7 +335,26 @@ def psign(
spacing: float = 0.0,
fontfile: str = "helvet.fnt",
) -> bytes:
"""product a Radiance picture from text"""
"""product a Radiance picture from text
Args:
text: text
background: background color
foreground: foreground color
reads_to_right: reads to right
reads_upwards: reads upwards
reads_to_left: reads to left
reads_downwards: reads downwards
height: height
aspect: aspect
xsize: xsize
ysize: ysize
spacing: spacing
fontfile: fontfile
Returns:
bytes: output of psign
"""
cmd = [str(BINPATH / "psign")]
cmd.extend(["-cb", str(background[0]), str(background[1]), str(background[2])])
cmd.extend(["-cf", str(foreground[0]), str(foreground[1]), str(foreground[2])])
Expand Down
16 changes: 15 additions & 1 deletion pyradiance/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,21 @@ def rcomb(
header: bool = True,
silent: bool = False,
) -> bytes:
"""Combine multiple rasters."""
"""Combine multiple rasters.
Args:
inps: Sequence of RcombInput object
transform: transform
transform_all: transform all
source: source
expression: expression
concat: concat
outform: output format
header: include header
silent: suppress output
Returns:
bytes: output of rcomb
"""
cmd = [str(BINPATH / "rcomb")]
stdin = None
if not header:
Expand Down

0 comments on commit e8a5179

Please sign in to comment.