def filter_by_moys(self, moys):
t_s = <NUM_LIT> / self.header.analysis_period.timestep<EOL>st_ind = self.header.analysis_period.st_time.moy / t_s<EOL>if self.header.analysis_period.is_reversed is False:<EOL><INDENT>_filt_indices = [int(moy / t_s - st_ind) for moy in moys]<EOL><DEDENT>else:<EOL><INDENT>if self.header.analysis_period.is_leap_year is False:<EOL><INDENT>eoy_ind = <NUM_LIT> * self.header.analysis_period.timestep - st_ind<EOL><DEDENT>else:<EOL><INDENT>eoy_ind = <NUM_LIT> * self.header.analysis_period.timestep - st_ind<EOL><DEDENT>_filt_indices = []<EOL>for moy in moys:<EOL><INDENT>ind = moy / t_s<EOL>if ind > st_ind:<EOL><INDENT>_filt_indices.append(int(ind - st_ind))<EOL><DEDENT>else:<EOL><INDENT>_filt_indices.append(int(ind + eoy_ind))<EOL><DEDENT><DEDENT><DEDENT>_filt_values = [self._values[i] for i in _filt_indices]<EOL>_filt_datetimes = [self.datetimes[i] for i in _filt_indices]<EOL>_filt_header = self.header.duplicate()<EOL>coll = HourlyDiscontinuousCollection(_filt_header, _filt_values, _filt_datetimes)<EOL>coll._validated_a_period = True<EOL>return coll<EOL>
Filter the Data Collection based on a list of minutes of the year.

        Args:
           moys: A List of minutes of the year [0..8759 * 60]

        Return:
            A new Data Collection with filtered data