You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: modelGetSignalsImages.m
    path of file: ./repos/ciatah/@ciatah
    
    the code of the file until where you have to start completion: function [inputSignals, inputImages, signalPeaks, signalPeaksArray, valid, validType, inputSignals2] = modelGetSignalsImages(obj,varargin)
	% Grabs input signals and images from current folder
	% Biafra Ahanonu
	% branched from controllerAnalysis: 2014.08.01 [16:09:16]
	% inputs
		% thisFileNum - this should be set to the folder
	% outputs
		%

	% changelog
		% 2017.01.14 [20:06:04] - support switched from [nSignals x y] to [x y nSignals]
		% 2020.04.16 [19:59:43] - Small fix to NWB file checking.
		% 2020.05.12 [18:02:04] - Update to make sure inputSignals2 with NWB.
		% 2020.12.08 [01:14:09] - Reorganized returnType to be outside raw signals flag, so common filtering mechanism regardless of variables loaded into RAM or not. This fixes if a user loads variables into RAM then uses cross-session alignment, the viewMatchObjBtwnSessions method may not display registered images (cross-session alignment is still fine and valid).
		% 2021.06.30 [14:52:23] - Updated to allow loading raw files without calling modelVarsFromFiles.
		% 2021.08.10 [09:57:36] - Updated to handle CIAtah v4.0 switch to all functions inside ciapkg package.
		% 2022.04.09 [20:30:52] - Ensure when loading cell extraction CIAtah-style that only MAT files are loaded.
	% TODO
		% Give a user a warning() output if there are no or empty cell-extraction outputs

	import ciapkg.api.* % import CIAtah functions in ciapkg package API.

	%========================
	% Type of file to return: 'filtered' or 'raw'

    
function [inputSignals, inputImages, signalPeaks, signalPeaksArray, valid, validType, inputSignals2] = modelGetSignalsImages(obj,varargin)
	% Grabs input signals and images from current folder
	% Biafra Ahanonu
	% branched from controllerAnalysis: 2014.08.01 [16:09:16]
	% inputs
		% thisFileNum - this should be set to the folder
	% outputs
		%

	% changelog
		% 2017.01.14 [20:06:04] - support switched from [nSignals x y] to [x y nSignals]
		% 2020.04.16 [19:59:43] - Small fix to NWB file checking.
		% 2020.05.12 [18:02:04] - Update to make sure inputSignals2 with NWB.
		% 2020.12.08 [01:14:09] - Reorganized returnType to be outside raw signals flag, so common filtering mechanism regardless of variables loaded into RAM or not. This fixes if a user loads variables into RAM then uses cross-session alignment, the viewMatchObjBtwnSessions method may not display registered images (cross-session alignment is still fine and valid).
		% 2021.06.30 [14:52:23] - Updated to allow loading raw files without calling modelVarsFromFiles.
		% 2021.08.10 [09:57:36] - Updated to handle CIAtah v4.0 switch to all functions inside ciapkg package.
		% 2022.04.09 [20:30:52] - Ensure when loading cell extraction CIAtah-style that only MAT files are loaded.
	% TODO
		% Give a user a warning() output if there are no or empty cell-extraction outputs

	import ciapkg.api.* % import CIAtah functions in ciapkg package API.

	%========================
	% Type of file to return: 'filtered' or 'raw'
	options.returnType = 'filtered';
	options.returnOnlyValid = 0;
	options.emSaveSorted = '_emAnalysisSorted.mat';
	options.forceManual = 0;
	options.fileNum = [];
	options.filterTraces = 0;
		% options.movAvgFiltSize = 5;
		options.movAvgFiltSize = [];
		% number of frames to calculate median filter
		% options.medianFilterLength = 201;
		options.medianFilterLength = 50;
	% decide whether to load algorithm peaks by default
	options.loadAlgorithmPeaks = 0;
	% 1 = Load signal peaks
	options.loadSignalPeaks = 1;
	% Binary: 1 = loads raw files quickly without additional checks. 0 = normal loading.
	options.fastFileLoad = 0;
	% SignalsImages, Images, Signals
	% which table to read in
	% options.getSpecificData = 'SignalsImages';
	%
	options.regexPairs = {...
		% {'_ICfilters_sorted.mat','_ICtraces_sorted.mat'},...
		% {'holding.mat','holding.mat'},...
		{obj.rawPCAICAStructSaveStr},...
		{obj.rawICfiltersSaveStr,obj.rawICtracesSaveStr},...
		{obj.rawEMStructSaveStr},...
		{obj.rawEXTRACTStructSaveStr},...
		{obj.rawCNMFStructSaveStr},...
		{obj.sortedICfiltersSaveStr,obj.sortedICtracesSaveStr},...
	};
	% get options
	options = getOptions(options,varargin);
	% display(options)
	% unpack options into current workspace
	% fn=fieldnames(options);
	% for i=1:length(fn)
	% 	eval([fn{i} '=options.' fn{i} ';']);
	% end