This color palette file can be imported into XnView's "Edit palette" tool. XnView (www.xnview.com) is a raster file viewer and editor that nicely complements HexSim. The map_productivity_report and map_projection_counts utilities will produce Hexmaps showing observed source-sink values distributed across a landscape. When viewing these source-sink maps, it can be advantageous to use a color scheme that clearly distinguishes sources from sinks. This Red-Yellow color scheme does so by joining two dissimilar color gradients. Neutral sites (those with hexagon scores very close to zero) will be shown in black. Sources will be shown using a gradient that shifts from green to yellow. Sinks will be shown using a gradient that shifts from blue to red. The color gradients used here are nonlinear, and designed to lump the worst sinks and best sources together visually. The Red-Yellow color scheme is shown below.
This zip file contains nine bitmaps that may be useful for getting started with HexSim. These BMP files can be opened with HexSim's Generate Hexmap tool (available under the HexSim menu). Several of the bitmap files come with a companion text file that indicates what the different image colors represent, and who to credit for the construction of the map. The four files labeled Jackson Pollock were made from images of this artist's work that can be found online. These bitmaps no longer look much like the original paintings because the images were reduced to just a handful of unique colors. These four images are intended to invoke the concept of spatial pattern without representing any actual place.
This PDF file contains 8 pages of useful information about hexagons and hexagon grids. This information was all captured from a website that no longer exists. The original author of this material is unfortunately unknown at present. Note that HexSim's hexagons are oriented differently than those described in this file.
The programs below are being provided with no assurance that they are free from coding or conceptual errors. Use them at your own risk. Some of these utilities construct HexSim input data, and others manipulate simulation products. The source below should be replaced with more modern code, probably written in Python.
Clicking on the links below will open the files in a separate window.
The utilities below can be compiled and executed within Cygwin (www.cygwin.com), or other analogous environments. Cygwin runs on Windows, so it can be used side-by-side with HexSim.
This utility is used to create a CSV file that can be imported into HexSim as a Hexmap. The Hexmap generated will be comprised of a collection of rectangular blocks. A number of command-line options are described in the file header. An analogous utility exists within the HexSimCommandLine tool, which is bundled with HexSim. HexSimCommandLine is documented in the User's Guide under Utilities / Command Line Options.
This utility is used to create a CSV file that can be imported into HexSim as a Hexmap. The Hexmap generated will be comprised of a collection of hexagon-shaped patches. A number of command-line options are described in the file header. An analogous utility exists within the HexSimCommandLine tool, which is bundled with HexSim. HexSimCommandLine is documented in the User's Guide under Utilities / Command Line Options.
This utility can be used to clip a Hexmap data file using a Hexmap mask. Both files must be in CSV format. A common use-case for this program will be to clip a patch map using a collection of nonzero hexagons extracted from a habitat map.
When patch maps are altered (e.g. clipped to a mask file), the total number of patches can change. This utility will renumber such a patch map, to ensure that the patch IDs are sequential. The Hexmap used must be stored in a CSV format.
Patch maps composed of many sequentially increasing or decreasing patches can be difficult to visualize. Adjacent patches end up being displayed using identical or nearly-identical colors, becoming hard to distinguish from each other. This utility will randomize the ID values used in a patch map, so that the map will be easier to visualize in HexSim. The Hexmap used must be stored in a CSV format.
This utility reads a patch map and a location-stratified productivity report, and constructs a Hexmap showing per-patch observed productivity values (birth - death). The patch map must be stored in a CSV format, and it must be the map that was used to generate the productivity report.
This utility reads a patch map and a location-stratified, count-based, projection matrix report. The patch map must be stored in a CSV format, and it must be the map used to generate the production matrix report. The algorithm creates five csv output files that contain patch-level statistics, plus productivity, emigration, immigration, and source-sink Hexmaps.
This utility reads a pair of location-stratified, count-based, projection matrix reports (a rate-based report and a count-based report, in that order), and it writes a CSV file that quantifies the flux and net flux rates between each pair of patches. The program also computes the change in lambda associated with the loss of each possible connection between patches. For more information on the net flux metric, see Schumaker et. al. 2014.
This utility reads a HexSim Hexmap (*.hxn) file, and converts the content to a comma-separated variable format. This type of conversion can be performed efficiently within HexSim, but if the content of many Hexmaps need to be processed at the same time, then using an external routine like this can greatly reduce the effort involved. For example, this utility could be modified to read multiple Hexmaps and merge their content into a single custom image. The resulting CSV file could then be imported into HexSim, or converted to a raster file using the Display Spatial Data tool.
This utility will generate a few useful statistics from a concatenation of HexSim Census event output files. Users will often run multiple replicates of the same simulation, and then want to obtain means, or other representative values for census output obtained across the collection of replicates. This utility simplifies that task. First, users must collect the Census event output files into a single CSV file containing a single header line. The Unix 'cat' command is ideal for this (but it will produce a file with multiple header lines). The concatenated file is passed to the utility along with the number of the column that the statistics should be generated for (the first column is numbered 1, not 0). The utility will write out the minimum, mean, maximum, number of zeros, and P(0) values for each time step, corresponding to the selected data column. P(0) here refers to the probability of extinction.
This utility will generate the sum or mean values, taken over all individuals, for Data Probe event output files. This is useful because Data Probe event output includes a separate row for each individual, and users will often want to summarize this information for each time step. Since the number of individuals will typically change each time step (and replicate), computing these sums and means can be awkward. To use the utility, users need only pass the Data Probe output CSV file, and one of the strings: 'sum' or 'mean'.
HexSim users will often find it useful to represent simulation output as frequency plots (histograms). Graphing packages use bar plots to display frequency data, but when the number of bins becomes large, point or line plots can become nicer than bar plots. This utility generates a frequency table from a file of data values. To use the utility, users must pass it the bin size and the data file (in that order). The data file must be a single column of numbers, with no header. The utility's output will contain three separate columns giving the midpoint of each bin, the number of records in each bin, and the percent of the data found in each bin. Generating a frequency plot for the data then becomes trivial.
HexSim users will frequently use patch maps to sample processes at scales greater than that of the atomic hexagon. For example, occupancy rates our source-sink value can be gathered on a patch-by-patch basis if users make sure that individuals identify which patch they are in when they are created, or when they move. However, when patches are bisected by barriers, these sampling schemes will produce meaningless results. This utility reads a patch map (stored as a CSV file) and a HexSim Barrier Map (a *.hbf file), and generates a new patch map in which every patch bisected by a barrier is divided up into multiple separate patches. Doing this manually is usually completely impractical.
When the barriers_divide_patches utility is used to a break patches along barriers, many small patch fragments will typically be generated. This utility can be used to remove these small fragments by aggregating adjacent patches that are not completely separated by a barrier. Users specify a patch map (stored as a CSV file), a HexSim Barrier Map (a *.hbf file), and a maximum patch area that cannot be exceeded during the aggregation process. It generates a new patch map in which some or all of the small patch fragments are incorporated into other patches.