Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract component splitting ampfacs/degincrs from ana-file of linked station #140

Open
veenstrajelmer opened this issue Aug 11, 2023 · 0 comments

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Aug 11, 2023

For D15 and others, components are added by using amplitude factors and degree differences between K13-components. The header of the D15 dia-file reads "* met theoretische f-factoren en comp.splitsing mbv K13". Therefore, these factors/differences can be computed from (a subset of) the K13 ana file of K13. This would simplify the user input significantly.

The hardcoded factors/differences from the user input script are:

if current_station == 'D15':
    CS_comps = pd.DataFrame({'CS_comps_derive':['P1','NU2','LABDA2','K2','T2'],
                             'CS_comps_from':['K1','N2','2MN2','S2','S2'],
                             'CS_ampfacs':[0.33,0.22,0.48,0.29,0.05],
                             'CS_degincrs':[-11,-24,174,1,-24]})

This is the subset from the K13 2007 component file:

COMP   33    14.958931     2.869  334.21  P1           
COMP   35    15.041069     8.598  345.06  K1         
COMP   59    28.439730    10.055  189.00  N2          
COMP   60    28.512583     2.224  164.68  NU2      
COMP   70    29.455625     1.562  185.58  LABDA2      
COMP   71    29.528479     3.256   11.33  2MN2        
COMP   76    29.958933      .877  237.59  T2          
COMP   77    30.000000    19.019  261.96  S2          
COMP   79    30.082137     5.489  260.56  K2   

Reproduction of factors/differences was successful:

import pandas as pd
import hatyan

CS_comps = pd.DataFrame({'CS_comps_derive':['P1','NU2','LABDA2','K2','T2'],
                         'CS_comps_from':['K1','N2','2MN2','S2','S2'],
                         'CS_ampfacs':[0.33,0.22,0.48,0.29,0.05],
                         'CS_degincrs':[-11,-24,174,1,-24]})

file_compk13 = r'p:\1209447-kpp-hydraulicaprogrammatuur\hatyan\hatyan_data_acceptancetests\predictie2019\k13APFM_ana_2007.txt'
comp_k13 = hatyan.read_components(file_compk13)

for compd,compf in zip(CS_comps['CS_comps_derive'],CS_comps['CS_comps_from']):
    diff_amp = comp_k13.loc[compd,'A'] / comp_k13.loc[compf,'A']
    diff_deg = comp_k13.loc[compd,'phi_deg'] - comp_k13.loc[compf,'phi_deg']
    print(compd,compf)
    print(f'{diff_amp:.4f}  {diff_deg:.1f}')

Returns:

P1 K1
0.3337  -10.9
NU2 N2
0.2212  -24.3
LABDA2 2MN2
0.4797  174.2
K2 S2
0.2886  -1.4
T2 S2
0.0461  -24.4

Since the splitted components are often the same, combine with #133 and set CS_comps_derive and CS_comps_from global defaults. In that case the only input required is the ana file or a components dataframe.

Relevant stations:

  • A12
  • D15 (from K13)
  • F16
  • F3PFM (from ??)
  • J6
  • K14PFM (from K13)
  • L9PFM
  • NORTHCMRT
  • Q1

Also add metadata that the analysis uses component splitting based on a certain station.

@veenstrajelmer veenstrajelmer changed the title extract component splitting values from ana-files of linked station (can be found in ana-file) extract component splitting ampfacs/degincrs from ana-file of linked station Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant