-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'lagrange' into ali-dev
- Loading branch information
Showing
14 changed files
with
340 additions
and
67 deletions.
There are no files selected for viewing
This file contains 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 file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# Roadmap | ||
|
||
## Version 0.9 | ||
|
||
The main goal of v0.9 is to offer a usable library, sufficiently friendly, with a minimalist API documentation. | ||
|
||
### Features | ||
|
||
- [ ] Methods | ||
- [x] Implement a `check()` method to fix colormap parameters if needed. | ||
- [x] Include a few minimalist methods to create or manipulate colormaps. More will be added in subsequent releases. | ||
- [ ] Add facilities to pass 8 or 16-bit integers to C graphical libraries. | ||
- [ ] Test with gtk-fortran and other libraries. | ||
- [x] Introspection (Colormap_info) | ||
- [ ] Include all available colormaps. | ||
- [ ] Add Interpolation functions. | ||
- [ ] Lagrange | ||
- [x] Bezier | ||
- [ ] Add a `Colormap_test` class where the subroutine `test_colormap()` will be moved. | ||
|
||
### Examples | ||
|
||
- [x] Create a `modify` example: | ||
- [x] For the `shift()` method. | ||
|
||
### Documentation | ||
|
||
- [x] Develop a PDF guide with all colorbars to aid in choosing a colormap. | ||
- [x] Develop a web version guide with all colorbars to aid in choosing a colormap. | ||
- [ ] Create a simple documentation generated with FORD. | ||
|
||
### Continuous Integration (CI) | ||
|
||
- [ ] Integrate fpm tests. | ||
- [ ] Integrate FORD documentation. | ||
|
||
### Building System | ||
|
||
- [x] Implement a CMake building system, allowing installation of a `.so` | ||
- [x] Test on Linux. | ||
- [ ] Test on FreeBSD. | ||
- [ ] Test on Windows (MSYS2). | ||
- [ ] Test on macOS. | ||
|
||
### Others | ||
|
||
- [x] Design a logo. | ||
|
||
<!-- ### Bug Fixes --> | ||
|
||
|
||
|
||
## Version 1.0 | ||
|
||
The main goal of v1.0 is to offer a library with a stable API and a first version of a Diataxis documentation. | ||
|
||
### Documentation | ||
|
||
- [ ] Specify which colormaps are colorblind-friendly, perceptually uniform, B&W print safe, etc. This information could be included in the Diataxis documentation. | ||
|
||
### Deprecation | ||
|
||
- [ ] Consider removing a few naive colormaps (e.g., "fire" is very similar to "black_body") | ||
|
||
### Quality Assurance | ||
|
||
- [ ] Add more automatic tests in `test/check.f90`. | ||
|
||
|
||
|
||
## Version 1.1 | ||
|
||
The main goal of v1.1 is to offer more features and to evolve the Diataxis documentation. | ||
|
||
|
||
# Ideas | ||
|
||
These concepts are open for implementation or consideration. They may or may not be implemented. | ||
|
||
### Features | ||
|
||
- [ ] Methods | ||
- [ ] Colormaps could have an option for logscale. | ||
- [ ] A `get_colorbar()` function could return an `array(:,:,1:3)` containing the RGB image of the colorbar. The arguments could be the width and height, the direction (horizontal/vertical), etc. | ||
- [ ] Add a `save()` or `export()` method | ||
- [ ] Transfer lut file subroutines from ForImage to ForColormap. | ||
- [ ] Add suport `.xml` file for use in ParaView or other softwares. | ||
- [ ] Improve the `shift()` method: | ||
- [ ] `shift_levels()`, `shift_real()` | ||
- [ ] Possibly shifting automatically the colormap according to the [zmin, zmax] range. For example [-6, 3]. | ||
- [ ] `shift_region()`: shifting certain segments of colormaps. | ||
- [ ] `split()` and `combine()` (could be useful to create a multi-sequential colormap) methods. | ||
- [ ] Convert to greyscale (note: convert to grayscale is implemented in ForImage). | ||
- [ ] Create and load colormaps based on other color formats (note: Color conversion is implemented in ForImage). | ||
- [ ] `brighten()` and darken (note: this is implemented in ForImage). | ||
- [ ] `mix()` two colormaps. | ||
- [ ] Develop a GUI using gtk-fortran to load, show, choose, modify, save, etc., colormaps. | ||
- [ ] Add Interpolation functions | ||
- [ ] B-Splines | ||
- [ ] NURBS | ||
- [ ] Colormaps | ||
- [ ] Add more colormaps, only if similar ones are not already available and cannot be easily obtained with the available methods. | ||
|
||
### Examples | ||
|
||
- [ ] An example mixing gtk-fortran and ForColormap (to put in https://github.com/vmagnin/gtk-fortran-extra). | ||
|
||
### Continuous Integration (CI) | ||
|
||
- [ ] Set up continuous integration (CI) to automatically generate PDF files and colormap tables on a monthly basis or after each pull request. | ||
|
||
### Documentation | ||
|
||
- [ ] Include a few images in the `README.md` file. | ||
- [ ] Include real simulation images. | ||
|
||
### Publication | ||
|
||
- [ ] Obtain a DOI from Zenodo, for example. | ||
- [ ] And/or submit a JOSS *(Journal of Open Source Software)* paper similar to https://joss.theoj.org/papers/10.21105/joss.02004 |
This file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
! The MIT License (MIT) | ||
! | ||
! Copyright (c) 2024 Vincent Magnin | ||
! | ||
! Permission is hereby granted, free of charge, to any person obtaining a copy | ||
! of this software and associated documentation files (the "Software"), to deal | ||
! in the Software without restriction, including without limitation the rights | ||
! to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
! copies of the Software, and to permit persons to whom the Software is | ||
! furnished to do so, subject to the following conditions: | ||
! | ||
! The above copyright notice and this permission notice shall be included in all | ||
! copies or substantial portions of the Software. | ||
! | ||
! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
! IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
! SOFTWARE. | ||
!------------------------------------------------------------------------------- | ||
! Contributed by vmagnin: 2024-02-14 | ||
! Last modification: vmagnin 2024-02-15 | ||
!------------------------------------------------------------------------------- | ||
|
||
!> This example shows how you can modify a colormap with methods like shift(), | ||
!> in concrete cases. | ||
program modify | ||
use forcolormap, only: Colormap, wp | ||
|
||
implicit none | ||
type(Colormap) :: cmap | ||
|
||
!> In the Scientific colour maps collection, all cyclic colormaps have their | ||
!> bright part in the middle. But we can shift the dark part towards the | ||
!> center. | ||
call cmap%set("bamO", 0.0_wp, 2.0_wp) | ||
call cmap%colorbar("bamO") | ||
call cmap%shift(cmap%get_levels() / 2) | ||
call cmap%colorbar("bamO_shifted") | ||
print *, "See the bamO.ppm and bamO_shifted.ppm colorbars" | ||
|
||
!> In the Scientific colour maps collection, all categorical colormaps | ||
!> begin with a dark colour, but a shift can be applied to begin with a | ||
!> brighter colour. | ||
call cmap%set("actonS", 0.0_wp, 2.0_wp) | ||
call cmap%colorbar("actonS") | ||
call cmap%shift(+2) !! Two levels towards left | ||
call cmap%colorbar("actonS_shifted") | ||
print *, "See the actonS.ppm and actonS_shifted.ppm colorbars" | ||
|
||
!> Starting from a diverging colormap, we can obtain what could be called | ||
!> a diverging multi-sequential colormap. | ||
call cmap%set("bam", 0.0_wp, 2.0_wp) | ||
call cmap%colorbar("bam") | ||
call cmap%shift(cmap%get_levels() / 2) | ||
call cmap%colorbar("bam_shifted") | ||
print *, "See the bam.ppm and bam_shifted.ppm colorbars" | ||
|
||
end program modify |
This file contains 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
Oops, something went wrong.