from reportlab.lib.pagesizes import A4
import reportlab.lib.colors as colors
import numpy as np


class Constants():
    YBRAIN_CH_LIST = ['Fp1', 'F7', 'T3', 'T5', 'T6', 'T4', 'F8', 'Fp2', 'F4', 'C4', 'P4', 'O2', 'Pz', 'Fz', 'Cz', 'O1', 'P3', 'C3', 'F3']

    UNIT_PIXEL = A4[1] / 3508.

    Y_LIM = 3508
    X_LIM = 2480

    SECOND_PAGE_Y = 400

    """"""""""""""""""""""""""""""""
    """     COLOR DEFINITION     """
    """"""""""""""""""""""""""""""""
    Y_BLUE = '#4589e1'
    Y_BLACK_TEXT = '#222222'
    Y_RED_TEXT = '#ef5350'
    Y_GRAY_TEXT = '#444444'
    Y_WHITE_TEXT = '#ffffff'

    """"""""""""""""""""""""""""""""
    """COMMON PAGE DESIGN ARGUMENT"""
    """"""""""""""""""""""""""""""""
    CMN_TEMPLATE_REC_IMG = './resource/img/img-page-accessories.png'
    CMN_RECT_DOUBLE_IMG = './resource/img/icon-rectangle-double.png'

    CMN_RECT_DOUBLE_W = 43
    CMN_RECT_DOUBLE_H = 43

    CMN_RECT_SINGLE_W = 17
    CMN_RECT_SINGLE_H = 17

    CMN_YB_TEXT = 'Ybrain'
    CMN_YB_TEXT_X = 2308
    CMN_YB_TEXT_Y = 100
    CMN_YB_TEXT_SIZE = 35
    CMN_YB_TEXT_COLOR = Y_BLUE
    CMN_YB_TEXT_ALPHA = 0.6

    CMN_PAGE_TEXT_X = 1240
    CMN_PAGE_TEXT_Y = 3405
    CMN_PAGE_TEXT_SIZE = 30
    CMN_PAGE_TEXT_COLOR = Y_GRAY_TEXT

    """"""""""""""""""""""""""""""""
    """COVER PAGE DESIGN ARGUMENT"""
    """"""""""""""""""""""""""""""""
    COVER_REC_1_IMG = './resource/img/img-cover-accessories.png'
    COVER_REC_1_X = 0
    COVER_REC_1_W = 196
    COVER_REC_1_Y = 0
    COVER_REC_1_H = 949

    COVER_VER_TEXT = 'Ver 2.0'
    COVER_VER_TEXT_SIZE = 35
    COVER_VER_TEXT_COLOR = Y_BLUE
    COVER_VER_TEXT_X = 2309
    COVER_VER_TEXT_Y = 105
    COVER_VER_TEXT_ALPHA = 0.6

    COVER_REC_2_X = 0
    COVER_REC_2_W = 2098
    COVER_REC_2_Y = 699
    COVER_REC_2_H = 1525
    COVER_REC_2_COLOR = Y_BLUE
    COVER_REC_2_ALPHA = 0.05

    COVER_BRAIN_TEXT = 'MINDD SCAN'
    COVER_BRAIN_TEXT_SIZE = 300 - 50
    COVER_BRAIN_TEXT_COLOR = Y_BLACK_TEXT
    COVER_BRAIN_TEXT_X = 310
    COVER_BRAIN_TEXT_Y = 1489

    COVER_REPORT_TEXT = 'REPORT'
    COVER_REPORT_TEXT_SIZE = 300
    COVER_REPORT_TEXT_COLOR = Y_BLACK_TEXT
    COVER_REPORT_TEXT_TYPE = 'Arial-Black'
    COVER_REPORT_TEXT_X = 310
    COVER_REPORT_TEXT_Y = 1768

    COVER_BRAIN_IMG = './resource/img/img-main-brain.png'
    COVER_BRAIN_IMG_X = 987
    COVER_BRAIN_IMG_Y = 300
    COVER_BRAIN_IMG_W = 1333
    COVER_BRAIN_IMG_H = 1140

    COVER_INFO_TEXT_X = 385
    COVER_INFO_TEXT_SIZE = 55
    COVER_INFO_TEXT_COLOR = Y_BLACK_TEXT

    COVER_NAME_TEXT_Y = 2434
    COVER_DATE_TEXT_Y = 2556
    COVER_AGE_TEXT_Y = 2678
    COVER_GENDER_TEXT_Y = 2800
    COVER_HAND_TEXT_Y = 2922

    COVER_CONTENT_TEXT_X = 900
    COVER_CONTENT_TEXT_SIZE = 55
    COVER_CONTENT_TEXT_COLOR = Y_BLACK_TEXT

    COVER_BAR_X = 335
    COVER_BAR_W = 15
    COVER_BAR_H = 15
    COVER_BAR_COLOR = Y_BLUE

    COVER_BAR_NAME_Y = 2455
    COVER_BAR_DATE_Y = 2577
    COVER_BAR_AGE_Y = 2699
    COVER_BAR_GENDER_Y = 2821
    COVER_BAR_HAND_Y = 2943

    COVER_YB_IMG = './resource/img/img-cover-accessories-ybrain.png'
    COVER_YB_IMG_X = 2282
    COVER_YB_IMG_Y = 2434
    COVER_YB_IMG_W = 198
    COVER_YB_IMG_H = 198

    COVER_YB_INFO_X = 342
    COVER_YB_INFO_Y = 3346
    COVER_YB_INFO_SIZE = 40
    COVER_YB_INFO_COLOR = Y_BLUE
    COVER_YB_INFO_ALPHA = 0.6

    COVER_REC_3_X = 340
    COVER_REC_3_Y = 3465
    COVER_REC_3_W = 2140
    COVER_REC_3_H = 43
    COVER_REC_3_COLOR = Y_BLUE

    """"""""""""""""""""""""""""""""
    """FUN PAGE DESIGN ARGUMENT"""
    """"""""""""""""""""""""""""""""
    FUN_TITLE_TEXT = 'Functional Abnormality'
    FUN_TITLE_TEXT_X = 220
    FUN_TITLE_TEXT_Y = 148
    FUN_TITLE_TEXT_COLOR = Y_BLACK_TEXT
    FUN_TITLE_TEXT_SIZE = 100

    FUN_OVERALL_REC_X = 227
    FUN_OVERALL_REC_Y = 675
    FUN_OVERALL_REC_Y_2 = 1650
    FUN_OVERALL_TEXT_X = 310
    FUN_OVERALL_TEXT_Y = 655
    FUN_OVERALL_TEXT_Y_2 = 1631
    FUN_OVERALL_TEXT_SIZE = 70
    FUN_OVERALL_TEXT_COLOR = Y_BLACK_TEXT

    FEATURE_DIST_ABS_IMG = './%s/%s_dist_abs_power_%s.png'
    FEATURE_DIST_REL_IMG = './%s/%s_dist_rel_power_%s.png'
    FEATURE_DIST_RAT_IMG = './%s/%s_dist_pow_rat_%s.png'

    FEATURE_DIST_BAR_IMG = './%s/%s_%s_bar.png'

    FUN_TOPO_IMG_X = 250
    FUN_TOPO_BAND_IMG_X = 1050
    FUN_TOPO_RAT_IMG_X = 280
    FUN_TOPO_IMG_Y = 820
    FUN_TOPO_IMG_Y_RAT = 1050
    FUN_TOPO_IMG_Y_RATIO = 1240
    FUN_TOPO_IMG_X_OFFSET = 560
    FUN_TOPO_IMG_Y_OFFSET_RATIO = 720
    FUN_TOPO_IMG_W = 690

    FUN_DIST_IMG_W = 1180
    FUN_DIST_IMG_X_OFFSET = 1140

    FUN_DIST_BAR_IMG_W = 2100

    FUN_DESC_TABLE_W = [0.12 * X_LIM * UNIT_PIXEL, 0.62 * X_LIM * UNIT_PIXEL, 0.12 * X_LIM * UNIT_PIXEL]
    FUN_DESC_TABLE_H_1 = [0.03 * Y_LIM * UNIT_PIXEL, 0.1 * Y_LIM * UNIT_PIXEL, 0.1 * Y_LIM * UNIT_PIXEL, 0.1 * Y_LIM * UNIT_PIXEL, 0.1 * Y_LIM * UNIT_PIXEL]
    FUN_DESC_TABLE_H_2 = [0.03 * Y_LIM * UNIT_PIXEL, 0.15 * Y_LIM * UNIT_PIXEL, 0.15 * Y_LIM * UNIT_PIXEL, 0.15 * Y_LIM * UNIT_PIXEL]
    """"""""""""""""""""""""""""""""
    """INTRO PAGE DESIGN ARGUMENT"""
    """"""""""""""""""""""""""""""""
    INTRO_REC_1_X = 60
    INTRO_REC_1_Y = 0
    INTRO_REC_1_W = 108
    INTRO_REC_1_H = 559

    INTRO_REC_2_X = 224
    INTRO_REC_2_Y = 316
    INTRO_REC_2_W = 1926
    INTRO_REC_2_H = 43
    INTRO_REC_2_COLOR = Y_BLUE
    INTRO_REC_2_ALPHA = 0.1

    INTRO_TITLE_TEXT = 'Appendix'
    INTRO_TITLE_TEXT_X = 220
    INTRO_TITLE_TEXT_Y = 148
    INTRO_TITLE_TEXT_COLOR = Y_BLACK_TEXT
    INTRO_TITLE_TEXT_SIZE = 200

    INTRO_BRAIN_REC_X = 267
    INTRO_BRAIN_REC_Y = 721
    INTRO_BRAIN_TEXT_X = 350
    INTRO_BRAIN_TEXT_Y = 710
    INTRO_BRAIN_TEXT_SIZE = 60
    INTRO_BRAIN_TEXT_COLOR = Y_BLACK_TEXT
    INTRO_BRAIN_IMG = './resource/img/img-brain-desc.png'
    INTRO_BRAIN_IMG_X = 360
    INTRO_BRAIN_IMG_Y = 820
    INTRO_BRAIN_IMG_W = 1793
    INTRO_BRAIN_IMG_H = 608

    INTRO_VIEW_REC_X = 267
    INTRO_VIEW_REC_Y = 1791
    INTRO_VIEW_TEXT_X = 350
    INTRO_VIEW_TEXT_Y = 1780
    INTRO_VIEW_TEXT_SIZE = 60
    INTRO_VIEW_TEXT_COLOR = Y_BLACK_TEXT
    INTRO_VIEW_IMG = './resource/img/img-3.png'
    INTRO_VIEW_IMG_X = 470
    INTRO_VIEW_IMG_Y = 2025
    INTRO_VIEW_IMG_W = 1747
    INTRO_VIEW_IMG_H = 1077

    INTRO_FREQUENCY_REC_X = 267
    INTRO_FREQUENCY_REC_Y = 730
    INTRO_FREQUENCY_TEXT_X = 350
    INTRO_FREQUENCY_TEXT_Y = 719
    INTRO_FREQUENCY_TEXT_SIZE = 60
    INTRO_FREQUENCY_TEXT_COLOR = Y_BLACK_TEXT
    INTRO_FREQUENCY_IMG = './resource/img/img-frequency.png'
    INTRO_FREQUENCY_IMG_X = 371
    INTRO_FREQUENCY_IMG_Y = 895
    INTRO_FREQUENCY_IMG_W = 1805
    INTRO_FREQUENCY_IMG_H = 260

    INTRO_GRAPH_REC_X = 267
    INTRO_GRAPH_REC_Y = 1430
    INTRO_GRAPH_TEXT_X = 350
    INTRO_GRAPH_TEXT_Y = 1419
    INTRO_GRAPH_TEXT_SIZE = 60
    INTRO_GRAPH_TEXT_COLOR = Y_BLACK_TEXT
    INTRO_GRAPH_IMG = './resource/img/img-graph.png'
    INTRO_GRAPH_IMG_X = 548
    INTRO_GRAPH_IMG_Y = 1608
    INTRO_GRAPH_IMG_W = 1518
    INTRO_GRAPH_IMG_H = 565

    INTRO_MONTAGE_REC_X = 267
    INTRO_MONTAGE_REC_Y = 2453
    INTRO_MONTAGE_TEXT_X = 350
    INTRO_MONTAGE_TEXT_Y = 2442
    INTRO_MONTAGE_TEXT_SIZE = 60
    INTRO_MONTAGE_TEXT_COLOR = Y_BLACK_TEXT
    INTRO_MONTAGE_IMG = './resource/img/img-brain.png'
    INTRO_MONTAGE_IMG_X = 776
    INTRO_MONTAGE_IMG_Y = 2515
    INTRO_MONTAGE_IMG_W = 978
    INTRO_MONTAGE_IMG_H = 877

    INTRO_EEG_REC_X = 267
    INTRO_EEG_REC_Y = 1651

    INTRO_EEG_TEXT_X = 350
    INTRO_EEG_TEXT_Y = 1640
    INTRO_EEG_TEXT_SIZE = 60
    INTRO_EEG_TEXT_COLOR = Y_BLACK_TEXT

    INTRO_EEG_DESC_TEXT_1_X = 350
    INTRO_EEG_DESC_TEXT_1_Y = 1779
    INTRO_EEG_DESC_TEXT_1_SIZE = 40
    INTRO_EEG_DESC_TEXT_1_COLOR = Y_BLACK_TEXT

    INTRO_EEG_DESC_TEXT_2_X = 350
    INTRO_EEG_DESC_TEXT_2_Y = 1851
    INTRO_EEG_DESC_TEXT_2_W = 1818
    INTRO_EEG_DESC_TEXT_2_SIZE = 40
    INTRO_EEG_DESC_TEXT_2_COLOR = Y_BLACK_TEXT

    INTRO_EEG_DETAIL_TEXT_X = 350
    INTRO_EEG_DETAIL_TEXT_Y = 2356
    INTRO_EEG_DETAIL_TEXT_SIZE = 40
    INTRO_EEG_DETAIL_TEXT_COLOR = Y_BLACK_TEXT

    INTRO_EEG_AMP_TEXT_X = 350
    INTRO_EEG_AMP_TEXT_Y = 2428
    INTRO_EEG_AMP_TEXT_SIZE = 40
    INTRO_EEG_AMP_TEXT_COLOR = Y_BLACK_TEXT

    INTRO_EEG_FREQ_TEXT_X = 350
    INTRO_EEG_FREQ_TEXT_Y = 2556
    INTRO_EEG_FREQ_TEXT_SIZE = 40
    INTRO_EEG_FREQ_TEXT_COLOR = Y_BLACK_TEXT

    INTRO_EEG_LENGTH_TEXT_X = 350
    INTRO_EEG_LENGTH_TEXT_Y = 2684
    INTRO_EEG_LENGTH_TEXT_W = 581
    INTRO_EEG_LENGTH_TEXT_SIZE = 40
    INTRO_EEG_LENGTH_TEXT_COLOR = Y_BLACK_TEXT

    INTRO_EEG_PHASE_TEXT_X = 350
    INTRO_EEG_PHASE_TEXT_Y = 2974
    INTRO_EEG_PHASE_TEXT_W = 691
    INTRO_EEG_PHASE_TEXT_SIZE = 40
    INTRO_EEG_PHASE_TEXT_COLOR = Y_BLACK_TEXT

    INTRO_EEG_DETAIL_TEXT_INDENT = 12

    INTRO_EEG_GRAPH_IMG = './resource/img/img-graph.png'
    INTRO_EEG_GRAPH_IMG_X = 1153
    INTRO_EEG_GRAPH_IMG_Y = 2813
    INTRO_EEG_GRAPH_IMG_W = 1138
    INTRO_EEG_GRAPH_IMG_H = 427

    INTRO_FREQ_REC_X = 267
    INTRO_FREQ_REC_Y = 2214

    INTRO_FREQ_TEXT_X = 350
    INTRO_FREQ_TEXT_Y = 2203
    INTRO_FREQ_TEXT_SIZE = 60
    INTRO_FREQ_TEXT_COLOR = Y_BLACK_TEXT

    INTRO_FREQ_IMG = './resource/img/img-frequency.png'
    INTRO_FREQ_IMG_X = 307
    INTRO_FREQ_IMG_Y = 2335
    INTRO_FREQ_IMG_W = 1868
    INTRO_FREQ_IMG_H = 367

    INTRO_DELTA_REC_X = 330
    INTRO_DELTA_REC_Y = 2347

    INTRO_DELTA_TEXT_X = 380
    INTRO_DELTA_TEXT_Y = 2332
    INTRO_DELTA_TEXT_SIZE = 40
    INTRO_DELTA_TEXT_COLOR = Y_BLACK_TEXT

    INTRO_THETA_REC_X = 330
    INTRO_THETA_REC_Y = 2441

    INTRO_THETA_TEXT_X = 380
    INTRO_THETA_TEXT_Y = 2426
    INTRO_THETA_TEXT_SIZE = 40
    INTRO_THETA_TEXT_COLOR = Y_BLACK_TEXT

    INTRO_ALPHA_REC_X = 330
    INTRO_ALPHA_REC_Y = 2535

    INTRO_ALPHA_TEXT_X = 380
    INTRO_ALPHA_TEXT_Y = 2520
    INTRO_ALPHA_TEXT_SIZE = 40
    INTRO_ALPHA_TEXT_COLOR = Y_BLACK_TEXT

    INTRO_BETA_REC_X = 330
    INTRO_BETA_REC_Y = 2629

    INTRO_BETA_TEXT_X = 380
    INTRO_BETA_TEXT_Y = 2614
    INTRO_BETA_TEXT_SIZE = 40
    INTRO_BETA_TEXT_COLOR = Y_BLACK_TEXT

    APP_FEATURE_TABLE_X = 150 * UNIT_PIXEL
    APP_FEATURE_TABLE_Y = (Y_LIM - 623) * UNIT_PIXEL
    APP_FEATURE_TABLE_W = 100 * UNIT_PIXEL
    APP_FEATURE_TABLE_H = 85 * UNIT_PIXEL

    """"""""""""""""""""""""""""""""
    """SUMMARY PAGE DESIGN ARGUMENT"""
    """"""""""""""""""""""""""""""""
    SUM_TITLE_TEXT = 'Summary'
    SUM_TITLE_TEXT_X = 220
    SUM_TITLE_TEXT_Y = 148
    SUM_TITLE_TEXT_SIZE = 200
    SUM_TITLE_TEXT_COLOR = Y_BLACK_TEXT

    SUM_PAT_INFO_REC_X = 227
    SUM_PAT_INFO_REC_Y = 460
    SUM_PAT_INFO_TEXT_X = 310
    SUM_PAT_INFO_TEXT_Y = 441
    SUM_PAT_INFO_TEXT_SIZE = 70
    SUM_PAT_INFO_TEXT_COLOR = Y_BLACK_TEXT

    SUM_SESS_INFO_REC_X = 1196
    SUM_SESS_INFO_REC_Y = 721
    SUM_SESS_INFO_TEXT = 'Session Information'
    SUM_SESS_INFO_TEXT_X = 1279
    SUM_SESS_INFO_TEXT_Y = 701
    SUM_SESS_INFO_TEXT_SIZE = 70
    SUM_SESS_INFO_TEXT_COLOR = Y_BLACK_TEXT

    SUM_PAT_SYMP_REC_X = 227
    SUM_PAT_SYMP_REC_Y = 1534
    SUM_PAT_SYMP_TEXT = 'Patient Symptoms'
    SUM_PAT_SYMP_TEXT_X = 310
    SUM_PAT_SYMP_TEXT_Y = 1514
    SUM_PAT_SYMP_TEXT_SIZE = 70
    SUM_PAT_SYMP_TEXT_COLOR = Y_BLACK_TEXT

    SUM_FEAT_REC_X = 1196
    SUM_FEAT_REC_Y = 1534
    SUM_FEAT_TEXT = 'Features'
    SUM_FEAT_TEXT_X = 1279
    SUM_FEAT_TEXT_Y = 1514
    SUM_FEAT_TEXT_SIZE = 70
    SUM_FEAT_TEXT_COLOR = Y_BLACK_TEXT

    SUM_ANAL_RES_TEXT = 'Analysis Results'
    SUM_ANAL_RES_TEXT_X = 315
    SUM_ANAL_RES_TEXT_Y = 2537
    SUM_ANAL_RES_TEXT_SIZE = 70
    SUM_ANAL_RES_TEXT_COLOR = Y_BLUE

    SUM_ANAL_RES_DESC_TEXT_X = 365
    SUM_ANAL_RES_DESC_TEXT_Y = 2708
    SUM_ANAL_RES_DESC_TEXT_W = 1681
    SUM_ANAL_RES_DESC_TEXT_SIZE = 30
    SUM_ANAL_RES_DESC_TEXT_COLOR = Y_BLACK_TEXT

    SUM_PAT_INFO_TABLE_X = 316 * UNIT_PIXEL
    SUM_PAT_INFO_TABLE_Y = (Y_LIM - 2850) * UNIT_PIXEL
    SUM_PAT_INFO_TABLE_W = [420 * UNIT_PIXEL, 420 * UNIT_PIXEL]
    SUM_PAT_INFO_TABLE_H = [85 * UNIT_PIXEL, 85 * UNIT_PIXEL, 85 * UNIT_PIXEL]
    SUM_PAT_INFO_TABLE_H_2 = [85 * UNIT_PIXEL, 85 * UNIT_PIXEL]

    FEATURE_BAND_IMG_Y = 820

    SUM_TMP_ABS_TEXT_X = 200
    SUM_TMP_ABS_TEXT_Y = 1320
    SUM_TMP_ABS_TEXT_W = 2000
    SUM_TMP_ABS_TEXT_SIZE = 35
    SUM_TMP_ABS_TEXT_COLOR = Y_BLACK_TEXT

    SUM_TMP_REL_TEXT_X = 100
    SUM_TMP_REL_TEXT_Y = 500
    SUM_TMP_REL_TEXT_W = 1500
    SUM_TMP_REL_TEXT_SIZE = 11
    SUM_TMP_REL_TEXT_COLOR = Y_BLACK_TEXT

    SUM_TMP_ASYM_TEXT_X = 100
    SUM_TMP_ASYM_TEXT_Y = 500
    SUM_TMP_ASYM_TEXT_W = 1500
    SUM_TMP_ASYM_TEXT_SIZE = 11
    SUM_TMP_ASYM_TEXT_COLOR = Y_BLACK_TEXT

    SUM_TMP_COH_TEXT_X = 100
    SUM_TMP_COH_TEXT_Y = 500
    SUM_TMP_COH_TEXT_W = 1500
    SUM_TMP_COH_TEXT_SIZE = 11
    SUM_TMP_COH_TEXT_COLOR = Y_BLACK_TEXT

    SUM_TMP_RAT_TEXT_X = 100
    SUM_TMP_RAT_TEXT_Y = 500
    SUM_TMP_RAT_TEXT_W = 1500
    SUM_TMP_RAT_TEXT_SIZE = 11
    SUM_TMP_RAT_TEXT_COLOR = Y_BLACK_TEXT

    """"""""""""""""""""""""""""""""
    """FEATURE PAGE DESIGN ARGUMENT"""
    """"""""""""""""""""""""""""""""
    FEATURE_TITLE_TEXT_X = 220
    FEATURE_TITLE_TEXT_Y = 148
    FEATURE_TITLE_TEXT_SIZE = 200
    FEATURE_TITLE_TEXT_COLOR = Y_BLACK_TEXT

    FEATURE_SUBTITLE_TEXT_X = 225
    FEATURE_SUBTITLE_TEXT_Y = 711
    FEATURE_SUBTITLE_TEXT_SIZE = 70
    FEATURE_SUBTITLE_TEXT_COLOR = Y_BLUE

    FEATURE_DESC_TEXT_X = 250
    FEATURE_DESC_TEXT_Y = 452
    FEATURE_DESC_TEXT_W = 1941
    FEATURE_DESC_TEXT_SIZE = 40
    FEATURE_DESC_TEXT_COLOR = Y_BLACK_TEXT

    FEATURE_BAND_IMG_X = 150
    FEATURE_RAT_IMG_X = 280
    FEATURE_IMG_Y = 910
    FEATURE_IMG_Y_RAT = 1050
    FEATURE_IMG_Y_RATIO = 1240
    FEATURE_IMG_X_OFFSET = 360
    FEATURE_IMG_Y_OFFSET_RATIO = 720
    FEATURE_IMG_W = 500

    FEATURE_REC_X = 225

    FEATURE_FEATURE_TEXT = 'Features'
    FEATURE_FEATURE_TEXT_X = 308
    FEATURE_FEATURE_TEXT_SIZE = 70
    FEATURE_FEATURE_TEXT_COLOR = Y_BLACK_TEXT

    FEATURE_NO_DESC_TEXT_X = 1230
    FEATURE_NO_DESC_TEXT_Y = 2400
    FEATURE_NO_DESC_TEXT_Y_RATIO = 1440
    FEATURE_NO_DESC_TEXT_SIZE = 40
    FEATURE_NO_DESC_TEXT_COLOR = Y_BLACK_TEXT

    FEATURE_NO_DESC_LINE_X = 225
    FEATURE_NO_DESC_LINE_1_Y = 2155
    FEATURE_NO_DESC_LINE_2_Y = 3035
    FEATURE_NO_DESC_LINE_W = 1941
    FEATURE_NO_DESC_LINE_H = 0
    FEATURE_NO_DESC_LINE_T = 1
    FEATURE_NO_DESC_LINE_COLOR = Y_BLUE
    FEATURE_NO_DESC_LINE_DOT = True

    FEATURE_ABS_POW_REC_Y = 1653
    FEATURE_REL_POW_REC_Y = 1653
    FEATURE_ASYM_REC_Y = 1553
    FEATURE_COH_REC_Y = 1603
    FEATURE_POW_RAT_REC_Y = 1603

    FEATURE_FEATURE_ABS_POW_TEXT_Y = 1633
    FEATURE_FEATURE_REL_POW_TEXT_Y = 1633
    FEATURE_FEATURE_ASYM_TEXT_Y = 1533
    FEATURE_FEATURE_COH_TEXT_Y = 1583
    FEATURE_FEATURE_POW_RAT_TEXT_Y = 1583

    FEATURE_ABS_POW_TEXT = 'Absolute Power'
    FEATURE_REL_POW_TEXT = 'Relative Power'
    FEATURE_ASYM_TEXT = 'Asymmetry'
    FEATURE_COH_TEXT = 'Coherence'
    FEATURE_POW_RAT_TEXT = 'Power Ratio'

    DELTA_TEXT = 'Delta'
    THETA_TEXT = 'Theta'
    ALPHA_TEXT = 'Alpha'
    BETA_TEXT = 'Beta'
    H_BETA_TEXT = 'High Beta'
    GAMMA_TEXT = 'Gamma'
    DELTA_FREQ_TEXT = '(1 ~ 4Hz)'
    THETA_FREQ_TEXT = '(4 ~ 8Hz)'
    ALPHA_FREQ_TEXT = '(8 ~ 12Hz)'
    BETA_FREQ_TEXT = '(12 ~ 25Hz)'
    H_BETA_FREQ_TEXT = '(25 ~ 30Hz)'
    GAMMA_FREQ_TEXT = '(30 ~ 40Hz)'
    BAND_TEXT_LIST = [DELTA_TEXT, THETA_TEXT, ALPHA_TEXT, BETA_TEXT, H_BETA_TEXT, GAMMA_TEXT]
    BAND_FREQ_TEXT_LIST = [DELTA_FREQ_TEXT, THETA_FREQ_TEXT, ALPHA_FREQ_TEXT, BETA_FREQ_TEXT, H_BETA_FREQ_TEXT, GAMMA_FREQ_TEXT]

    DAR_TEXT = 'DAR'
    TAR_TEXT = 'TAR'
    TBR_TEXT = 'TBR'
    RATIO_TEXT_LIST = [DAR_TEXT, TAR_TEXT, TBR_TEXT]

    FEATURE_BAND_X = 571
    FEATURE_RAT_X = 571
    FEATURE_BAND_X_OFFSET = 720
    FEATURE_RAT_X_OFFSET = 720
    FEATURE_BAND_Y = 1463
    FEATURE_BAND_Y_OFFSET = 40
    FEATURE_BAND_TEXT_SIZE = 35
    FEATURE_BAND_TEXT_COLOR_BLACK = Y_BLACK_TEXT
    FEATURE_BAND_TEXT_COLOR_RED = Y_RED_TEXT

    FEATURE_ABS_POW_IMG = './report/%s/%s_abs_power_%s.png'
    FEATURE_REL_POW_IMG = './report/%s/%s_rel_power_%s.png'
    FEATURE_ASYM_IMG = './report/%s/%s_asymmetry_%s.png'
    FEATURE_COH_IMG = './report/%s/%s_coherence_%s.png'
    FEATURE_POW_RAT_IMG = './report/%s/%s_rat_power_%s.png'

    FEATURE_ABS_POW_IMG_X_START = 0
    FEATURE_REL_POW_IMG_X_START = 0
    FEATURE_ASYM_IMG_X_START = 0
    FEATURE_COH_IMG_X_START = 0
    FEATURE_POW_RAT_IMG_X_START = 0

    FEATURE_ABS_POW_IMG_Y_START = 470
    FEATURE_REL_POW_IMG_Y_START = 470
    FEATURE_ASYM_IMG_Y_START = 470
    FEATURE_COH_IMG_Y_START = 470
    FEATURE_POW_RAT_IMG_Y_START = 470

    PSD_TITLE_TEXT = 'Power Spectral Density'
    PSD_TITLE_TEXT_X = 220
    PSD_TITLE_TEXT_Y = 148
    PSD_TITLE_TEXT_SIZE = 170
    PSD_TITLE_TEXT_COLOR = Y_BLACK_TEXT

    PSD_SUBTITLE_TEXT_X = 225
    PSD_SUBTITLE_TEXT_Y = 711
    PSD_SUBTITLE_TEXT_SIZE = 70
    PSD_SUBTITLE_TEXT_COLOR = Y_BLUE

    PSD_DESC_TEXT_X = 225
    PSD_DESC_TEXT_Y = 452
    PSD_DESC_TEXT_W = 1863
    PSD_DESC_TEXT_SIZE = 40
    PSD_DESC_TEXT_COLOR = Y_BLACK_TEXT

    PSD_MEAN_IMG = '%s_mean_psd.png'
    PSD_MEAN_IMG_X = 531
    PSD_MEAN_IMG_Y = 930
    PSD_MEAN_IMG_W = 1400
    PSD_MEAN_IMG_H = 875

    PSD_CHANNEL_IMG = '%s_channel_psd.png'
    PSD_CHANNEL_IMG_X = 356
    PSD_CHANNEL_IMG_Y = 1700
    PSD_CHANNEL_IMG_W = 1750
    PSD_CHANNEL_IMG_H = 1750

    PSD_BAND_TEXT_SIZE = 25
    PSD_BAND_TEXT_Y = 1570
    PSD_DELTA_TEXT_X = 710
    PSD_THETA_TEXT_X = 837
    PSD_ALPHA_TEXT_X = 984
    PSD_BETA_TEXT_X = 1290

    PEAK_TITLE_TEXT = 'Alpha Peak'
    PEAK_TITLE_TEXT_X = 220
    PEAK_TITLE_TEXT_Y = 148
    PEAK_TITLE_TEXT_SIZE = 170
    PEAK_TITLE_TEXT_COLOR = Y_BLACK_TEXT

    PEAK_DESC_TEXT_X = 225
    PEAK_DESC_TEXT_Y = 452
    PEAK_DESC_TEXT_W = 1863
    PEAK_DESC_TEXT_SIZE = 40
    PEAK_DESC_TEXT_COLOR = Y_BLACK_TEXT

    PEAK_O1_IMG = 'crt_alpha_peak_ch_15.png'
    PEAK_O1_IMG_X = 135
    PEAK_O2_IMG = 'crt_alpha_peak_ch_11.png'
    PEAK_O2_IMG_X = 1300
    PEAK_IMG_Y = 960
    PEAK_IMG_W = 1180
    PEAK_IMG_H = 855

    FEATURE_FREQ_POW_RAT_Y_START = 632
    FEATURE_FREQ_DAR_X_START = A4[0] * 0 / 3 + 40
    FEATURE_FREQ_TAR_X_START = A4[0] * 1 / 3 + 40
    FEATURE_FREQ_TBR_X_START = A4[0] * 2 / 3 + 40
    FEATURE_FREQ_DAR_TEXT = 'Delta/Alpha Ratio'
    FEATURE_FREQ_TAR_TEXT = 'Theta/Alpha Ratio'
    FEATURE_FREQ_TBR_TEXT = 'Theta/Beta Ratio'

    FEATURE_PSD_TITLE_TEXT = 'PSD'
    FEATURE_PSD_IMG_SPE = 'channel_psd.png'
    FEATURE_PSD_IMG_Y_START = 180

    FEATURE_REF_TEXT_X = 225
    FEATURE_REF_TEXT_Y = 2200
    FEATURE_REF_TEXT_SIZE = 40
    FEATURE_REF_TEXT_COLOR = Y_BLACK_TEXT
    FEATURE_REF_TEXT_W = 2081

    FEATURE_SUM_TEXT_X = 720
    FEATURE_SUM_TEXT_X_OFFSET = 511.5
    FEATURE_SUM_TEXT_Y = 2275
    FEATURE_SUM_TEXT_SIZE = 35
    FEATURE_SUM_TEXT_COLOR = Y_BLACK_TEXT

    FEATURE_SUM_IMG_X = 540
    FEATURE_SUM_IMG_X_OFFSET = 511
    FEATURE_SUM_IMG_Y = 1854
    FEATURE_SUM_IMG_W = 361
    FEATURE_SUM_IMG_H = 361
    """"""""""""""""""""""""""""""""
    """SURVEY PAGE DESIGN ARGUMENT"""
    """"""""""""""""""""""""""""""""

    SURVEY_TITLE_TEXT = 'Questionnaire'
    SURVEY_TITLE_TEXT_X = 220
    SURVEY_TITLE_TEXT_Y = 148
    SURVEY_TITLE_TEXT_SIZE = 170
    SURVEY_TITLE_TEXT_COLOR = Y_BLACK_TEXT

    SURVEY_REC_X = 225
    SURVEY_REC_Y = 731
    SURVEY_REC_Y_OFFSET = 807

    SURVEY_NAME_TEXT_X = 308
    SURVEY_NAME_TEXT_Y = 711
    SURVEY_NAME_TEXT_SIZE = 70
    SURVEY_NAME_TEXT_COLOR = Y_BLACK_TEXT

    SURVEY_TOTAL_BAR_LENGTH = 1835
    SURVEY_BAR_X = 314
    SURVEY_BAR_Y = 916
    SURVEY_BAR_T = 20

    SURVEY_LEVEL_LABEL_TEXT_FLOAT = 'Level%d (%.2f~%.2f)'
    SURVEY_LEVEL_LABEL_TEXT_INT = 'Level%d (%d~%d)'
    SURVEY_LEVEL_LABEL_TEXT_X = 1232
    SURVEY_LEVEL_LABEL_TEXT_Y_OFFSET = 66
    SURVEY_LEVEL_LABEL_TEXT_SIZE = 35
    SURVEY_LEVEL_LABEL_TEXT_COLOR = Y_BLACK_TEXT

    SURVEY_COMMENT_TEXT_X = 314
    SURVEY_COMMENT_TEXT_Y = 1067
    SURVEY_COMMENT_TEXT_SIZE = 38
    SURVEY_COMMENT_TEXT_COLOR = Y_BLACK_TEXT
    SURVEY_COMMENT_TEXT_W = 1836

    SURVEY_COMMENT_LINE_X = 314
    SURVEY_COMMENT_LINE_Y = 1336.5
    SURVEY_COMMENT_LINE_W = 1835
    SURVEY_COMMENT_LINE_T = 1
    SURVEY_COMMENT_LINE_COLOR = Y_BLUE

    SURVEY_DESC_TEXT_X = 441 + 1598 / 2
    SURVEY_DESC_TEXT_Y_1 = 3200
    SURVEY_DESC_TEXT_SIZE = 35
    SURVEY_DESC_TEXT_Y_2 = SURVEY_DESC_TEXT_Y_1 + SURVEY_DESC_TEXT_SIZE * 1.2
    SURVEY_DESC_TEXT_COLOR = '#555555'

    SURVEY_TOTAL_BAR_COLOR = '#EAEAEA'
    SURVEY_SCORE_BAR_COLOR_BLUE = '#57cbf2'
    SURVEY_SCORE_BAR_COLOR_GREEN = '#9fd9b3'
    SURVEY_SCORE_BAR_COLOR_RED = '#ef5350'

    SURVEY_GAD_TEXT = 'GAD-7'
    SURVEY_PHQ_TEXT = 'PHQ-9'
    SURVEY_HIT_TEXT = 'HIT-6'

    SURVEY_BAR_COLOR = ['#435DF5', '#FF9900', '#F32725']

    """"""""""""""""""""""""""""""""
    """REFER PAGE DESIGN ARGUMENT"""
    """"""""""""""""""""""""""""""""
    REFER_TITLE_TEXT = 'Reference'
    REFER_TITLE_TEXT_X = 220
    REFER_TITLE_TEXT_Y = 148
    REFER_TITLE_TEXT_SIZE = 200
    REFER_TITLE_TEXT_COLOR = Y_BLACK_TEXT

    REFER_NUMBER_TEXT_X = 225
    REFER_NUMBER_TEXT_Y = 511
    REFER_NUMBER_TEXT_SIZE = 40
    REFER_NUMBER_TEXT_COLOR = Y_BLACK_TEXT

    REFER_REF_TEXT_X = 297
    REFER_REF_TEXT_Y = 711
    REFER_REF_TEXT_W = 1797
    REFER_REF_TEXT_SIZE = 40
    REFER_REF_TEXT_COLOR = Y_BLACK_TEXT

    """"""""""""""""""""""""""""""""
    """ Compare Page Text """
    """"""""""""""""""""""""""""""""

    CMP_ANAL_TEXT_COLOR = Y_BLACK_TEXT
    CMP_ANAL_TEXT_SIZE = 100
    CMP_ANAL_TEXT_X = 220
    CMP_ANAL_TEXT_Y = 148
    CMP_ANAL_FEATURE_TEXT_X = 895

    CMP_TOPO_IMG_W = 440
    CMP_TOPO_IMG_X = 680
    CMP_TOPO_IMG_Y = 950
    CMP_TOPO_IMG_X_OFFSET = 460

    CMP_BAND_TEXT_X = 450
    CMP_BAND_TEXT_Y = 1120
    CMP_BAND_TEXT_Y_OFFSET = 40

    CMP_NO_DESC_LINE_X = 225
    CMP_NO_DESC_LINE_1_Y = 2700
    CMP_NO_DESC_LINE_2_Y = 3035
    CMP_NO_DESC_LINE_W = 1941
    CMP_NO_DESC_LINE_H = 0
    CMP_NO_DESC_LINE_T = 1
    CMP_NO_DESC_LINE_COLOR = Y_BLUE
    CMP_NO_DESC_LINE_DOT = True

    CMP_REF_TEXT_X = 225
    CMP_REF_TEXT_Y = 2750
    CMP_REF_TEXT_SIZE = 40
    CMP_REF_TEXT_COLOR = Y_BLACK_TEXT
    CMP_REF_TEXT_W = 1941

    CMP_NO_DESC_TEXT_X = 1230
    CMP_NO_DESC_TEXT_Y = 2960
    CMP_RAT_NO_DESC_TEXT_Y = 2760
    CMP_RAT_NO_DESC_LINE_Y_1 = 2500
    CMP_RAT_NO_DESC_LINE_Y_2 = 3000
    CMP_CON_NO_DESC_TEXT_Y = 817
    CMP_CON_NO_DESC_LINE_Y = 1080
    CMP_NO_DESC_TEXT_Y_RATIO = 1440
    CMP_NO_DESC_TEXT_SIZE = 40
    CMP_NO_DESC_TEXT_COLOR = Y_BLACK_TEXT

    TIME_TEXT_LIST = ['Pre', 'Post', 'Diff']
    TIME_TEXT_X = 900
    TIME_TEXT_X_OFFSET = 460
    TIME_TEXT_Y = 930
    TIME_TEXT_SIZE = 40
    TIME_TEXT_COLOR = Y_BLACK_TEXT

    CMP_ALPHA_PSD_IMG = '%s_alpha_peak_ch_%d.png'
    CMP_ALPHA_PSD_IMG_X = 450
    CMP_ALPHA_PSD_IMG_Y = 900
    CMP_ALPHA_PSD_IMG_X_OFFSET = 900
    CMP_ALPHA_PSD_IMG_Y_OFFSET = 560
    CMP_ALPHA_PSD_IMG_W = 800
    CMP_ALPHA_PSD_IMG_H = 560

    CMP_ALPHA_TIME_TEXT_X = 300
    CMP_ALPHA_TIME_TEXT_Y = 1250

    CMP_ALPHA_DIFF_IMG = 'diff_alpha_compare_%d.png'

    CMP_ALPHA_NO_DESC_TEXT_Y = 2955
    CMP_ALPHA_NO_DESC_LINE_1_Y = 2715
    CMP_ALPHA_NO_DESC_LINE_2_Y = 3195

    CMP_TOPO_IMG_X = 680
    CMP_TOPO_IMG_Y = 950
    CMP_TOPO_IMG_X_OFFSET = 460

    CMP_CON_TOPO_IMG_X = 680
    CMP_CON_TOPO_IMG_Y = 950
    CMP_CON_BAND_TEXT_Y = 1150
    CMP_CON_TOPO_IMG_X_OFFSET = 460
    CMP_CON_TOPO_IMG_W = 400

    FAKE_ABS_POW = {
        'Delta': np.array([8, 2, 2, 1, 2, 2, 8, 7, 2, 3, 1, 3, 1, 1, 1, 5, 2, 1, 3]),
        'Theta': np.array([0.3, 1, 1, 0.76, 0.1, 0.55, 0.23, 1, 0.56, 0.23, 0.45, 0.34, 0.22, 2, 0.41, 0.89, 0.12, 0.67, 0.3]),
        'Alpha': np.array([0.35, 0.8, 0.23, 0.5, 0.34, 0.222, 0.7, 0.55, 0.34, 0.9, 0.332, 0.3, 0.23, 0.67, 0.44, 1, 0.2, 0.187, 0.55]),
        'Beta': np.array([0.1, 0.3, 0.12, 0.18, 0.22, 0.19, 0.11, 0.2, 0.3, 0.12, 0.26, 0.12, 0.11, 0.11, 0.2, 0.27, 0.23, 0.32, 0.22]),
        'High Beta': np.array([0.8, 0.7, 0.23, 0.14, 0.23, 0.24, 0.13, 0.3, 0.1, 0.23, 0.17, 0.2, 0.11, 0.5, 0.12, 0.21, 0.19, 0.13, 0.4]),
        'Gamma': np.array([0.8, 0.2, 0.145, 0.09, 0.19, 0.101, 0.19, 0.2, 0.18, 0.218, 0.2, 0.21, 0.105, 0.1, 0.209, 0.23, 0.018, 0.21, 0.11])
    }

    APPENDIX_ANALYSIS_IMG = './resource/img/appendix.png'

    APPENDIX_ANALYSIS_IMG_X = 300
    APPENDIX_ANALYSIS_IMG_Y = 700
    APPENDIX_ANALYSIS_IMG_W = 1800
    APPENDIX_ANALYSIS_IMG_H = 1350
