DOCUMENTATION

SYNOPSIS

PROGRAM NAME: immodpg (interactive ray trace modeling) 
AUTHOR:  Juan Lorenzo

CHANGES and their DATES

DATES:    Feb 7 2020
				April 4 2021

Version  0.0.1 , 0.0.2

DESCRIPTION

Interactively model first arrivals using raytracing approximation

USE

Examplesoff

SEISMIC UNIX NOTES

STEPS

NOTES

We are using Moose.
Moose already declares that you need debuggers turned on
so you don't need a linewlike the following:
use warnings;

When program starts change file is initialized to "no". --change file 
is deleted and reset to a default "no" at the start. 
change file is set to yes in Perl.
however we are careful only to do so when the file indicates a previous 'no'
and reset to no in fortran after fortran uses the setting
When exiting the change file contains a "yes"

Avoids asynchronous reading and writing crashes
Lock files are not failsafe

There are two types of methods:

One method type only sets the message type (immodpg->set_option(message #)) and 
indicates a forced change (immodpg->set_change(yes)) for use with fortran 
program immodpg.for
e.g., _setVbot_plus, _set_move_down.
The gui shows a symbol for these cases

A second type of method manages changing values for a parameter as well
as the functions of the first method. These actions are relegated to
immodpg
eg., _setVbot, _setVtop_upper_layer, _setVincrement, _set_clip, _set_layer
The gui shows a parameter value that can be changed by the user.
The Entry widget is configured to recognize text value changes and
a return(1) is needed to indicate a successful validation

immodpg must follow premmod to prevent logical circularity as a result of the use of the 'aliased' syntax

April 2021, removed commented lines

private anonymous hash used to hand off variables for external printing

Instantiate classes:

Create a new version of the package 
with a unique name

Declare variables in local memory space

Declare:

default values for screen when the configuration file is missing

initialize:

useful variables with defaults

Create Main Window

Start event-driven loop
Interaction with user

immodpg requires Main window widget to display
error messages

Decide whether to Start Main widget but temporarily withdraw until checks are complete Window is needed for error messages

clean old files from past sessions

initialize files after cleaning trash

initialize values in modules

Get starting configuration

parameters from a configuration file

Error checks Adjust working, upper, and lower layer for extraneous values

Get model values of Vp, thickness, and error switch from immodpg.out for initial settings in GUI

Prepare su file for input to immodpg.for generate a binary file

Establish Main Window

top_settings frame

Contains: (1) working layer (2) z inc and V inc in m/s

help goes to superflow bindings

Create

font types

Entry widgets

VbotEntry

VbotEntry MUST first be created before it can be used by a callback subroutine

Vbot_upper_layerEntry

Vbot_upper_layerEntry MUST first be created before it can be used by a callback subroutine

VincrementEntry

VincrementEntry MUST first be created before it can be used by a callback subroutine

VtopEntry

VtopEntry MUST first be created before it can be used by a callback subroutine

VbotNtop_factorEntry

VbotNtop_factorEntry MUST first be created before it can be used by a callback subroutine

Vtop_lower_layerEntry

Vtop_lower_layerEntry MUST first be created before it can be used by a callback subroutine

clip4plotEntry

clip4plotEntry MUST first be created before it can be used by a callback subroutine

layerEntry

layerEntry MUST first be created before it can be used by a callback subroutine

lower_layerLabel

lower_layerLabel widget will be updated in immodpg

Entry _thickness_increment_mEntryEntry

thickness_increment_mEntry MUST first be created before it can be used by a callback subroutine

thickness_mEntry

thickness_mEntry MUST first be created before it can be used by a callback subroutine

thickness_mLabel

upper_layerLabel

upper_layerLabel widget will be update in immodpg

Buttons widgets

Buttons widgets

row index=0

row index

row index

row index

row index

row index 1-2 col 3

row index 3-4 col 4

row index 2, col 6

row index

row index

row index

row index

VbotNtop_multiply_button row index = 1 col 2

row index = 1 col 2

row index = 2 col 7

row index = 3 col 7

row index

row index

row index=5

zoom_minus_button row index 1-2 col 3

zoom_plus_button row index 1-2 col 3

Label widgets

Label widget box for Vbot of upper layer

Label widget box for Vincrement

Label #widget box for Vtop

Label widget box for Vtop of lower layer

Label widget box for Vbot

Label factor

Label clip4plot

Label widget box for thicknes increment

Label empty

Label widget box for Layer number

Label widget box for Layer number

Label widget box for velocity m/s

Label widget box for Layer number

row index = 0 col8

row index = 0 col 9

row index = 0 col 10

row index = 1-2 col 3

row index = 1-2 col4

row index = 1 col 8

row index = 1 col 9

row index = 2 col 8

row index = 2 col9

row index = 2 col10

row index = 2 col11

row index = 3 col11

row index = 3 col 8

row index = 4 col 8

row index = 4 col 9

row index = 3-4 col 3

row index = 3-4 col 4

row index = 1 col 5

row index = 2-3 col0

row index = 2-3 col 1

row index = 2-3 col2

row index 2 col 5

row index 2 col 6

row index 2 col 7

row index 3 col5

row index 3 col 6

row index 3 col 7

row index 4 col 5

row index 5 col 8

row index = 5 col 4

row index = 0 col 0

row index = 8 col 1

row index = 7 col 0

row index = 7 col 3

row index = 6 col 1

row index = 7 col 1

row index = 7 col 5

row index = 6 col 5

row index = 8 col 5

row index = 6 col 8

row index = 7 col 8

row index = 8 col 8

row index = 9 col 9

row index = 9 col 8

row index = 6 col 9

row index = 7 col 9

row index = 9 col 8

sub _setVincrement _setVincrement sets interaction with immodpg.for writes out Vincrement for immodpg to read return(1) validates command for Entry

sub _setVbotNtop_factor _setVbotNtop_factor sets interaction with immodpg.for writes out VbotNtop_factor for immodpg to read return(1) validates command for Entry

sub _set_clip _set_clip sets interaction with immodpg.for writes out clip for immodpg to read return(1) validates command for Entry'

sub _set_layer callbacks write out message for mmodpg.f writes out layer for immodpg to read return(1) validates command for Entry

sub _setVbot callbacks: write out message for mmodpg.f set_option and set_change set interactions with immodpg.f return(1) validates command for Entry

sub _setVbot_upper_layer callbacks write out message for mmodpg.f set_option and set_change set interactions with immodpg.f return(1) validates command for Entry

sub _setVtop callbacks write out message for mmodpg.f set_option and set_change set interactions with immodpg.f return(1) validates command for Entry

sub _setVtop_lower_layer callbacks write out message for mmodpg.f set_option and set_change set interactions with immodpg.f return(1) validates command for Entry

sub _setVbotNtop_multiply callbacks: - provide widgets to immodpg -refocus allows other Entries to update (focus) -update the gui for factor (_setVbotNtop_factor) _setVbotNtop_factor ALSO provides widgets to immodpg -update gui velocities (->setVbotNtop_multiply) -write out message for mmodpg.f: set_option set_change set interactions with immodpg.f

sub _setVbot_minus

callbacks
write out message for mmodpg.f
set_option and set_change
set interactions with immodpg.f

sub _setVbotNVtop_lower_layer_minus callbacks write out message for mmodpg.f set_option and set_change set interactions with immodpg.f

sub _setVbotNVtop_lower_layer_plus callbacks write out message for mmodpg.f set_option and set_change set interactions with immodpg.f

sub _setVbot_plus callbacks write out message for mmodpg.f set_option and set_change set interactions with immodpg.f

sub _setVtop_minus callbacks setVtop_minus: modify gui set_option: write out message for mmodpg.f set_change: set interactions with immodpg.f

sub _setVtop_plus callbacks setVtop_plus: modify gui set_option: write out message for mmodpg.f set_change: set interactions with immodpg.f

sub _setVbotNtop_minus callbacks setVtop_plus: modify gui set_option: write out message for mmodpg.f set_change: set interactions with immodpg.f

create pause between Vbot and Vtop changes

sub _setVbotNtop_plus callbacks write out message for mmodpg.f set_option and set_change set interactions with immodpg.f

sub _setVtopNVbot_upper_layer_minus callbacks setVtop_plus: modify gui set_option: write out message for mmodpg.f set_change: set interactions with immodpg.f

sub _setVtopNVbot_upper_layer_plus callbacks setVtop_plus: modify gui set_option: write out message for mmodpg.f set_change: set interactions with immodpg.f

sub _set_exit

callbacks
write out message for mmodpg.f
write out
 saying goodbye
 clear old images
 kill window
 stop script

sub _set_move_down callbacks write out message for mmodpg.f write out

sub _set_move_left callbacks write out message for mmodpg.f write out

sub _set_move_right callbacks write out message for mmodpg.f write out

sub _set_move_up callbacks write out message for mmodpg.f write out

sub _set_update New focus is needed within set_update, specifically: immodpg,_check_update

sub _set_zoom_minus callbacks write out message for mmodpg.f write out

sub _set_zoom_plus callbacks write out message for mmodpg.f write out

sub _set_thickness_m

sub _set_thickness_m_minus

sub _set_thickness_m_plus

sub _set_thickness_increment_m