This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import trimesh # https://github.com/mikedh/trimesh | |
| def write_ovf(voxel_grid, filename, resolution): | |
| """ Writes voxel grid into OVF file format. """ | |
| nx, ny, nz = voxel_grid.shape | |
| with open(filename, 'w') as f: | |
| f.write("# OOMMF OVF 2.0\n") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ This script implements a class for calculating the Earth terminator. | |
| Additional functionality for calculating the boundary of the various | |
| twilight types and plotting these areas on a 2D map are also provided. | |
| -------------------------------------------------------------------------- | |
| Copyright (C) 2023 Jonathan Maes | |
| This program is free software: you can redistribute it and/or modify | |
| it under the terms of the GNU Lesser General Public License as published | |
| by the Free Software Foundation, either version 3 of the License, or | |
| (at your option) any later version. |