sam2p
Convert SAM/BAM alignment data to pileup format
TLDR
Concatenate all PDF files into one
SYNOPSIS
sam2p [options] [input_file...]
PARAMETERS
-o
Specifies the output filename.
-f
Sets the output format (e.g., ps, pdf, png, jpg, tiff, gif, bmp, ppm).
-r
Sets the output resolution for raster formats in DPI.
-s
Applies a scaling factor to the output.
-c
Specifies an alternative configuration file for plotting.
-t
Adds a custom title to the plot.
-l
Forces landscape orientation for the output.
-P
Forces portrait orientation for the output.
-w
Sets the output width in inches (for vector) or pixels (for raster).
-H
Sets the output height in inches (for vector) or pixels (for raster).
-p
Specifies a range of pages to convert (e.g., '1-5', '2,4').
-bg
Sets the background color (e.g., 'white', '#RRGGBB').
-fg
Sets the foreground color.
-x
Specifies an X-offset for the plot on the page.
-y
Specifies a Y-offset for the plot on the page.
-v
Displays the version information and exits.
-h
Displays a brief help message and exits.
DESCRIPTION
sam2p is a specialized command-line utility used for converting display files generated by the SAD (Seismic Analysis Display) software suite into various standard graphics formats. These display files typically contain visualizations of seismic data, such as traces, sections, and plots.
sam2p enables users to transform these specialized data representations into widely accessible formats like PostScript (.ps), PDF (.pdf), PNG (.png), JPEG (.jpg), TIFF (.tif), GIF (.gif), BMP (.bmp), and PPM (.ppm). This conversion is crucial for sharing, printing, or embedding seismic visualizations into reports and presentations, bridging the gap between specialized scientific software and general-purpose document and image handling tools. It offers control over output resolution, scaling, page layout, and various other graphical parameters.
CAVEATS
sam2p is highly specialized, primarily designed for converting files produced by the SAD (Seismic Analysis Display) software suite. It is not a general-purpose image or document converter like ImageMagick or Ghostscript and cannot process arbitrary image or document types. Its utility is limited to the specific display file formats generated by the SAM and SAD programs. Proper functioning, especially for PostScript and PDF output, often depends on external tools like Ghostscript being installed and accessible.
INPUT FORMATS
sam2p primarily processes display files generated by the SAD and SAM software, which are specialized binary or ASCII formats representing seismic traces, plots, and graphical elements. These files are typically created as output from seismic data processing and visualization workflows within the SAD environment.
OUTPUT FORMATS
The command supports a variety of output formats including vector graphics (PostScript, PDF) for high-quality printing and scalability, and raster image formats (PNG, JPEG, TIFF, GIF, BMP, PPM) suitable for web, screen display, and common image manipulation. The choice of format depends on the intended use case, with vector formats preferred for print and raster for general digital sharing.
HISTORY
sam2p is an integral component of the SAD (Seismic Analysis Display) software suite, which originated in academic and geophysical research environments for the visualization and analysis of seismic data. Developed to address the specific need for converting specialized graphical output from seismic processing into standard printable and viewable formats, sam2p has been a stable tool within this niche community for decades. Its development has focused on maintaining compatibility with the evolving SAD data formats and supporting a range of common graphical output standards.