Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikPGJ committed Feb 26, 2024
1 parent 1f04abf commit 6826ecf
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 16 deletions.
30 changes: 25 additions & 5 deletions mission/solar_orbiter/+solo/+adm/DSMD.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,49 @@
% First created 2020-05-28.
%
classdef DSMD
% PROPOSAL: Rename DatasetMetadata.
% PRO: Consistent with other class naming for BICAS.
% PROPOSAL: Better name,
% PROPOSAL: Long name: DatasetMetadata.
% PRO: Consistent with other class naming for BICAS.
% -model
% -metadata
% -file
%
% PROPOSAL: Make DSMD entirely immutable, including .datasetId. Modify
% solo.adm.convert_DSMD_DATASET_ID_to_SOLO() to create new instance instead.
%
% PROPOSAL: Add file modification timestamp.
% CON: Not desirable for DSMDs which do not correspond to preexisting files on disk.
% Ex: bicas.tools.batch.autocreate_input_BPCIs2___speedTest calling
% solo.adm.paths_to_DSMD_array() for just filenames.
% Ex: bicas.tools.batch.run_BICAS_all_passes() calling
% solo.adm.paths_to_DSMD_array() for just filenames.
% PROPOSAL: New class = path + modif. timestamp + DSMD(without path/modif.timestamp)
%
% PROPOSAL: Remove path from DSMD.
% PRO: path is not metadata.
% PRO: path is information that is often "correlated" with the metadata in algorithms, but it is not used by algorithms.
% Ex: Filter DSMDs ==> Filter paths
% Ex: Group DSMDs ==> Group paths
% Ex: Group DSMDs ==> Group paths
% PROPOSAL: Algorithms should not return DSMDs but indices into the
% argument DSMD array.
% Ex: Group DSMDs should return groups of indices instead.
% PROPOSAL: New class = path + DSMD(without path)
% PROPOSAL: New class = path, modification date + DSMD(without path and modification date)
% DSMDF=DatasetMetadataFile
% DSMDM=DatasetMetadataModel
% PROPOSAL: New class inherits from DSMD.
% PROPOSAL: New class owns one DSMD (composition).
% PRO: May want to extract non-file DSMDs from (array of) file DSMDs.
%
% PROPOSAL: Add static function for extracting CA of dataset filenames from
% array of DSMDs.
%
% TODO-DEC: What constitutes equality between DSMDs?
% Same DSI and time interval?
% isCdag? Version number?
% Path?
% Path? Filename?
%
% PROPOSAL: Datetime objects should have uppercase initial
% PRO: Consistent with (BICAS) naming conventions.



Expand Down
5 changes: 3 additions & 2 deletions mission/solar_orbiter/+solo/+adm/paths_to_DSMD_array.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
% ARGUMENT
% ========
% filePathCa
% Cell array of file paths. All of them must follow naming conventions.
% Cell array of file paths.
%
%
% RETURN VALUE
% ============
% DsmdArray
% Column array of DSMD objects.
% Column array of DSMD objects for those input filenames which follow
% naming conventions.
% bIsDatasetArray
% Logical column array. Same size as argument. True iff the corresponding
% input path was interpreted as a dataset (was translated into a DSMD).
Expand Down
13 changes: 4 additions & 9 deletions mission/solar_orbiter/+solo/+qli/quicklooks_main.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function quicklooks_main(...
%
% PROPOSAL: Better name: quicklooks_main?
% ~main, ~plot, ~generate
% generate_quicklooks()
%
% PROPOSAL: Directly generate arrays of timestamps for iterating over, instead
% of via TimeIntervalNonWeeks and TimeIntervalWeeks.
Expand Down Expand Up @@ -90,6 +91,8 @@ function quicklooks_main(...
%
% PROPOSAL: Move quicklooks_24_6_2.m constants here. Submit values as arguments.
%
% PROPOSAL: Always round time up to full weeks for 7-day plots.
%
%
% quicklooks_24_6_2_h.m(), quicklooks_7day()
% ==========================================
Expand Down Expand Up @@ -390,15 +393,7 @@ function quicklooks_7days_local(Tint, vht6h, Paths, logoPath)

% Earth position (also uses SPICE)
dt = 60*60;
% Tlength = Tint(end)-Tint(1);
% dTimes = 0:dt:Tlength;
% Times = Tint(1)+dTimes;
earthPosTSeries = get_Earth_pos(Tint, dt);
% if ~isempty(earthPos)
% Data.earthpos = irf.ts_vec_xyz(Times, earthPos);
% else
% Data.earthpos = TSeries();
% end
Data.earthpos = earthPosTSeries;

% Plot data and save figure
Expand Down Expand Up @@ -448,7 +443,7 @@ function quicklooks_7days_local(Tint, vht6h, Paths, logoPath)
earthPosTSeries = irf.ts_vec_xyz(Times, earthPos);
else
% earthPos = [];
earthPosTSeries = TSeries();
earthPosTSeries = TSeries(); % Empty TSeries.
end
end

Expand Down

0 comments on commit 6826ecf

Please sign in to comment.