public class CoreSections
extends java.lang.Object
CoreSection
s, stored as a linked hash map
indexed by a string identifier. The purpose of this class is to
implement useful operations on groups of CoreSection
s.Modifier and Type | Method and Description |
---|---|
void |
alignSections(double topAlignment,
int margin)
Aligns the declinations of these core sections from the top
down.
|
boolean |
areSectionEndDirectionsDefined(int margin)
Reports whether all samples within section ends have a defined direction.
|
static CoreSections |
fromSampleListByDiscreteId(java.util.List<Sample> sampleList)
Split a sample list into core sections according to the discrete
IDs of the samples.
|
java.util.Set<Sample> |
getEndSamples(int margin)
Returns a set containing all the samples which are near the end
of any section within this group of sections.
|
java.util.LinkedHashMap<java.lang.String,CoreSection> |
getSections()
Get a linked map of core sections.
|
public static CoreSections fromSampleListByDiscreteId(java.util.List<Sample> sampleList)
sampleList
- samples to splitpublic java.util.LinkedHashMap<java.lang.String,CoreSection> getSections()
fromSampleListByDiscreteId
, the order corresponds to the original
sample order.public void alignSections(double topAlignment, int margin)
margin
argument. The initial declination is given as the
topAlignment
argument. First, the magnetizations in the
top section are rotated by an equal amount around the vertical
axis, in such a way that the top declination of the top section
equals topAlignment
. The next section down is rotated in
a similar way, except that in this case its top declination is
brought into alignment with the top section's (rotated) bottom
declination. This process is repeated down the core, with the
each section being rotated as a whole in order align its top declination
with the bottom declination of the section above it.topAlignment
- target declination for top of core, in degreesmargin
- number of samples to use in determining top and bottom
declinationspublic java.util.Set<Sample> getEndSamples(int margin)
margin
samples of each section are counted
as being "near the end".margin
- the number of samples from each end of each section
to include in the returned set of samplesmargin
samples
of the end of any section within this grouppublic boolean areSectionEndDirectionsDefined(int margin)
margin
- number of samples in a section endtrue
if and only if every sample in every section end
has a defined direction