Conversation
Updated the package version in the DESCRIPTION file to 3.5.0.9000 to reflect ongoing development.
Updated default parameter values in geopressure_map_likelihood, geopressure_map_mismatch, and geopressure_map_preprocess to reference formals from geopressure_map. This improves consistency and maintainability of default values across related functions.
Replaces all instances of the 'setmap' condition with 'tag_set_map' in function calls, documentation, and user messages for consistency. Updates related logic and comments to reflect the new naming convention.
This commit removes unnecessary line breaks (\) from cli::cli_* and related message strings across multiple R scripts. This improves message formatting, readability, and consistency in console outputs, especially for progress bars, warnings, and errors.
Refactors geolight_map() to delegate calibration, twilight likelihood, and likelihood combination to new modular functions: geolight_map_calibrate, geolight_map_twilight, and geolight_map_likelihood. Adds new files for these functions and for geolight_solar, and updates tag_assert and map_create to support new map types and status checks. Updates and expands tests for geolight_map and adds new tests for geolight_solar. Adds and updates documentation for new and refactored functions.
Introduces a centralized .MAP_TYPE object for map type definitions and palettes in a new R/map_type.R file. Updates map_create, plot.map, and tag2map to use .MAP_TYPE for type validation, palette selection, and likelihood map handling. Simplifies and improves palette logic in plot.map, adds palette_to_colors utility, and updates documentation accordingly.
Refactored map selection logic in geopressureviz to use .MAP_TYPE and dynamically determine available maps. Introduced map_type_key to track map types and passed it through shiny options and background processes. Updated server logic to use map_type_key for selecting map display specifications. Added callr to required packages in global.R.
Simplified the trainset function by eliminating support for interim .RData files. The function now only checks for labeled and unlabeled CSV files, streamlining the data loading process.
Added a call to normalizePath for label_dir to ensure the path is properly resolved before use. This helps prevent issues with relative or malformed paths.
Moved the async 'Query pressure' button logic from server.R to a new server_query_position.R file and refactored the process_pressuretimeseries function for improved robustness and compatibility with older objects. This modularizes the code, improves maintainability, and enhances handling of pressure path data.
Introduces process tracking to prevent background Shiny app processes from being garbage-collected, adds a debug option to the trainset app, and makes session end behavior configurable via shiny options. Also updates server logic to respect the new stop_on_session_end option for both geopressureviz and trainset apps.
Enhanced the plot.tag function to support new types (temperature_external, temperature_internal), modularized type dispatch, and improved default type selection logic. Refactored repeated code for plotly conversion into a helper (plot_tag_finalize), extracted twilight offset resolution and matrix-to-long conversion into separate functions, and fixed a bug in twilight labeling. Improved actogram color scaling and made the codebase more maintainable and extensible.
Refactored the plot.map function to clarify and expand argument documentation, including new parameters such as thr_likelihood, provider, palette, opacity, and legend. Improved path plotting logic to check for both longitude and latitude values, and updated palette handling in palette_to_colors to remove viridisLite support.
Added new arguments to plot_path for map, provider, polyline, and circle customization. Refactored static plotting logic into a new plot_path_static function and improved color handling for known and zenith points. Enhanced leaflet and static plotting to better handle missing data and provide more flexible visualization options.
Renamed geolight_find_location to geolight_fit_location and updated its documentation. Added and revised documentation for geolight_map and related functions, including new calibration and aggregation options. Replaced plot_tag_twl_calib with plot_twl_calib, updating references throughout. Improved argument descriptions, examples, and cross-references in multiple man pages for clarity and consistency.
Replaced usage of formals() to set default argument values with explicit constants in multiple R functions and their documentation. This improves code clarity, ensures consistent defaults, and avoids potential issues if formals() changes. Updated config.yml to comment out fitted_location_duration and adjusted related documentation accordingly.
Replaced manual argument validation with match.arg for several function parameters across multiple files. This change improves code clarity and ensures consistent handling of argument choices.
…ht+accelration would work
Expand tag_status label detection to handle label fields on either pressure or acceleration sensors. Add guards using assertthat::has_name(tag, 'pressure') and assertthat::has_name(tag, 'acceleration') before checking their 'label' subfield to avoid NULL/undefined access errors.
Remove explicit GeoPressureR:: prefixes and use unqualified function names across server modules. Updated calls to plot_twl_calib, stap2duration, map_expand, and path2twilight in inst/geolightviz and inst/trainset to rely on package imports. Note: the internal call to GeoPressureR:::time2plottime was left as-is. This simplifies code assuming these functions are exported/imported in the package namespace.
Replace direct subsetting stap[stap$include & is.na(stap$known_lat), ] with an existence-aware filter. Initialize an all-TRUE index and apply include and known_lat conditions only if those columns exist to avoid errors when either column is absent and to preserve rows accordingly.
Include "altitude" in the set of permitted variables for pressurepath_create. Update the validation (setdiff) and the error message so that requests for "altitude" are accepted and listed among allowed variables.
Limit which columns from path are merged into the pressurepath (now only stap_id, lat, lon and optionally j) using intersect(...) and drop = FALSE instead of excluding start/end. This prevents unintended columns from being carried into the output. Also update roxygen docs: move `j` earlier in the field list and clarify that lat/lon are interpolated linearly during flight.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New functions related to light
Major Update
Trainset
GeoLightViz
GeoPressureViz
Minor fixes