diff --git a/trimsp/TrimSPGUI4/COPYING.txt b/trimsp/TrimSPGUI4/COPYING.txt new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/trimsp/TrimSPGUI4/COPYING.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/trimsp/TrimSPGUI4/Chem.pm b/trimsp/TrimSPGUI4/Chem.pm new file mode 100644 index 0000000..8e869ca --- /dev/null +++ b/trimsp/TrimSPGUI4/Chem.pm @@ -0,0 +1,636 @@ +# This file is part of TrimSPGUI. +# +# TrimSPGUI is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# TrimSPGUI is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Foobar. If not, see . +# +# Copyright 2009 by Zaher Salman and the LEM Group. + +package Chem; + +sub parse_formula { + my ($formula) = @_; +# print STDOUT "formula=$formula\n"; + my (%elements); + + #check balancing + return %elements if (!ParensBalanced($formula)); + + # replace other grouping with normal parens + $formula =~ tr/<>{}[]/()()()/; + + # get rid of any spaces + $formula =~ s/\s+//g; + + # perform macro expansion + foreach (keys(%macros)) { + $formula =~ s/$_/$macros{$_}/g; + } + + # determine initial compound coeficent + my $coef = ($formula =~ s/^(\d+\.?\d*)//) ? $1 : 1.0; + + # recursively process rest of formula + return internal_formula_parser($formula, $coef, %elements); +} + + +sub internal_formula_parser { + use Text::Balanced qw(extract_bracketed); + + my ($formula, $coef, %form) = @_; + my $tmp_coef; + + my ($extract, $remainder, $prefix) = + extract_bracketed($formula, '()', '[^(]*'); + + if (defined($extract) and $extract ne '') { + $extract =~ s/^\((.*)\)$/$1/; + if ($remainder =~ s/^(\d+\.?\d*)(.*)$/$2/) { + $tmp_coef = $1 * $coef; + } else { + $tmp_coef = $coef; + } + + # get formula of prefix ( it has no parens) + %form = add_formula_strings($prefix, $coef, %form) if ($prefix ne ''); + + # check remainder for more parens + %form = internal_formula_parser($remainder, $coef, %form) + if ($remainder ne ''); + + # check extract for more parens + %form = + internal_formula_parser($extract, $tmp_coef, %form); + ## we already know this is ne '' + } else { # get formula of complete string + %form = add_formula_strings($remainder, $coef, %form) + if ($remainder ne ''); + } + return %form; +} + + +sub add_formula_strings { + my ($formula, $coef, %elements) = @_; + +# print "Getting Formula of $formula\n"; + $formula =~ /^(?:([A-Z][a-z]*)(\d+\.?\d*)?)+$/o # XXX new + or die "Invalid Portion of Formula $formula"; + while ($formula =~ m/([A-Z][a-z]*)(\d+\.?\d*)?/go) { # XXX new + my ($elm, $count) = ($1, $2); + $count = 1 unless defined $count; + if (defined $elements{$elm}) { + $elements{$elm} += $count * $coef; + } else { + $elements{$elm} = $count * $coef; + } + } + return %elements; +} + +sub ParensBalanced { + my ($form) = @_; + my @stack = (); + my %pairs = ( + '<' => '>', + '{' => '}', + '[' => ']', + '(' => ')' + ); + + while ($form =~ m/([<>(){}\]\[])/go) { + my $current = $1; + if ($current =~ /[<({\[]/) { + push(@stack, $current); + next; + } + return 0 if (scalar(@stack) == 0); + return 0 if ($current ne $pairs{ pop @stack}); + } + return @stack ? 0 : 1; +} + +sub Zof { + my ($El) = @_; + + my %ElementsZ = ( + "Muon",1, + "Li8", 3, + "B12", 5, + "H",1, + "He", 2, + "Li", 3, + "Be", 4, + "B", 5, + "C", 6, + "N", 7, + "O", 8, + "F", 9, + "Ne", 10, + "Na", 11, + "Mg", 12, + "Al", 13, + "Si", 14, + "P", 15, + "S", 16, + "Cl", 17, + "Ar", 18, + "K", 19, + "Ca", 20, + "Sc", 21, + "Ti", 22, + "V", 23, + "Cr", 24, + "Mn", 25, + "Fe", 26, + "Co", 27, + "Ni", 28, + "Cu", 29, + "Zn", 30, + "Ga", 31, + "Ge", 32, + "As", 33, + "Se", 34, + "Br", 35, + "Kr", 36, + "Rb", 37, + "Sr", 38, + "Y", 39, + "Zr", 40, + "Nb", 41, + "Mo", 42, + "Tc", 43, + "Ru", 44, + "Rh", 45, + "Pd", 46, + "Ag", 47, + "Cd", 48, + "In", 49, + "Sn", 50, + "Sb", 51, + "Te", 52, + "I", 53, + "Xe", 54, + "Cs", 55, + "Ba", 56, + "La", 57, + "Ce", 58, + "Pr", 59, + "Nd", 60, + "Pm", 61, + "Sm", 62, + "Eu", 63, + "Gd", 64, + "Tb", 65, + "Dy", 66, + "Ho", 67, + "Er", 68, + "Tm", 69, + "Yb", 70, + "Lu", 71, + "Hf", 72, + "Ta", 73, + "W", 74, + "Re", 75, + "Os", 76, + "Ir", 77, + "Pt", 78, + "Au", 79, + "Hg", 80, + "Tl", 81, + "Pb", 82, + "Bi", 83, + "Po", 84, + "At", 85, + "Rn", 86, + "Fr", 87, + "Ra", 88, + "Ac", 89, + "Th", 90, + "Pa", 91, + "U", 92, + "", 0.0000 + ); + return $ElementsZ{$El}; +} + +sub Massof { + my ($El) = @_; + + my %ElementsA = ( + "Muon",0.113, + "Li8", 8.0, + "B12", 12.0, + "H", 1.00800, + "He", 4.00300, + "Li", 6.93900, + "Be", 9.01200, + "B", 10.81100, + "C", 12.01100, + "N", 14.00700, + "O", 15.99900, + "F", 18.99800, + "Ne", 20.18300, + "Na", 22.99000, + "Mg", 24.31200, + "Al", 26.98200, + "Si", 28.08600, + "P", 30.97400, + "S", 32.06400, + "Cl", 35.45300, + "Ar", 39.94800, + "K", 39.10200, + "Ca", 40.08000, + "Sc", 44.95600, + "Ti", 47.90000, + "V", 50.94200, + "Cr", 51.99600, + "Mn", 54.93800, + "Fe", 55.84700, + "Co", 58.93300, + "Ni", 58.71000, + "Cu", 63.54000, + "Zn", 65.37000, + "Ga", 69.72000, + "Ge", 72.59000, + "As", 74.92200, + "Se", 78.96000, + "Br", 79.90900, + "Kr", 83.80000, + "Rb", 85.47000, + "Sr", 87.62000, + "Y", 88.90500, + "Zr", 91.22000, + "Nb", 92.90600, + "Mo", 95.94000, + "Tc", 98.00000, + "Ru", 101.07000, + "Rh", 102.90500, + "Pd", 106.40000, + "Ag", 107.87000, + "Cd", 112.40000, + "In", 114.82000, + "Sn", 118.69000, + "Sb", 121.75000, + "Te", 127.60000, + "I", 126.90400, + "Xe", 131.30000, + "Cs", 132.90500, + "Ba", 137.34000, + "La", 138.91000, + "Ce", 140.12000, + "Pr", 140.90700, + "Nd", 144.24001, + "Pm", 147.00000, + "Sm", 150.35001, + "Eu", 151.96001, + "Gd", 157.25000, + "Tb", 158.92400, + "Dy", 162.50000, + "Ho", 164.92999, + "Er", 167.25999, + "Tm", 168.93401, + "Yb", 173.03999, + "Lu", 174.97000, + "Hf", 178.49001, + "Ta", 180.94800, + "W", 183.85001, + "Re", 186.20000, + "Os", 190.20000, + "Ir", 192.20000, + "Pt", 195.09000, + "Au", 196.96700, + "Hg", 200.59000, + "Tl", 204.37000, + "Pb", 207.19000, + "Bi", 208.98000, + "Po", 210.00000, + "At", 210.00000, + "Rn", 222.00000, + "Fr", 223.00000, + "Ra", 226.00000, + "Ac", 227.00000, + "Th", 232.03799, + "Pa", 231.00000, + "U", 238.03000, + "", 0.0000 + ); + return $ElementsA{$El}; + +} + +sub Dichteof { + my ($El) = @_; + + my %Dichte = ( + "H", 0.08, + "He", 0.12, + "Li", 0.53, + "Be", 1.85, + "B", 2.35, + "C", 3.51, + "N", 1.03, + "O", 2.00, + "F", 1.11, + "Ne", 1.50, + "Na", 0.97, + "Mg", 1.74, + "Al", 2.70, + "Si", 2.33, + "P", 1.00, + "S", 2.07, + "Cl", 2.03, + "Ar", 1.77, + "K", 0.86, + "Ca", 1.54, + "Sc", 2.99, + "Ti", 4.51, + "V", 6.09, + "Cr", 7.14, + "Mn", 7.44, + "Fe", 7.87, + "Co", 8.89, + "Ni", 8.91, + "Cu", 8.92, + "Zn", 7.14, + "Ga", 5.91, + "Ge", 5.32, + "As", 5.72, + "Se", 4.19, + "Br", 3.14, + "Kr", 3.10, + "Rb", 1.53, + "Sr", 2.63, + "Y", 4.47, + "Zr", 6.51, + "Nb", 8.58, + "Mo", 10.28, + "Tc", 11.49, + "Ru", 12.45, + "Rh", 12.41, + "Pd", 12.02, + "Ag", 10.49, + "Cd", 8.64, + "In", 7.31, + "Sn", 7.29, + "Sb", 6.69, + "Te", 6.25, + "I", 4.94, + "Xe", 3.80, + "Cs", 1.90, + "Ba", 3.65, + "La", 6.16, + "Ce", 6.77, + "Pr", 6.48, + "Nd", 7.00, + "Pm", 7.22, + "Sm", 7.54, + "Eu", 5.25, + "Gd", 7.89, + "Tb", 8.25, + "Dy", 8.56, + "Ho", 8.78, + "Er", 9.05, + "Tm", 9.32, + "Yb", 6.97, + "Lu", 9.84, + "Hf", 13.31, + "Ta", 16.68, + "W", 19.26, + "Re", 21.03, + "Os", 22.61, + "Ir", 22.65, + "Pt", 21.45, + "Au", 19.32, + "Hg", 13.55, + "Tl", 11.85, + "Pb", 11.34, + "Bi", 9.80, + "Po", 9.20, + "At", 0.10, + "Rn", 0.10, + "Fr", 0.10, + "Ra", 5.50, + "Ac", 10.07, + "Th", 11.72, + "Pa", 15.37, + "U", 18.97, + "", 0.0000 + ); + return $Dichte{$El}; +} + + +sub Elastof { + my ($El) = @_; + + my %Elast = ( + "H", 0.10000, + "He", 0.10000, + "Li", 1.63000, + "Be", 3.32000, + "B", 5.77000, + "C", 7.37000, + "N", 4.92000, + "O", 2.60000, + "F", 0.84000, + "Ne", 0.02000, + "Na", 1.11000, + "Mg", 1.51000, + "Al", 3.39000, + "Si", 4.63000, + "P", 3.43000, + "S", 2.85000, + "Cl", 1.40000, + "Ar", 0.08000, + "K", 0.93000, + "Ca", 1.84000, + "Sc", 3.90000, + "Ti", 4.85000, + "V", 5.31000, + "Cr", 4.10000, + "Mn", 2.92000, + "Fe", 4.28000, + "Co", 4.39000, + "Ni", 4.44000, + "Cu", 3.49000, + "Zn", 1.35000, + "Ga", 2.81000, + "Ge", 3.85000, + "As", 2.96000, + "Se", 2.25000, + "Br", 1.22000, + "Kr", 0.12000, + "Rb", 0.85000, + "Sr", 1.72000, + "Y", 4.37000, + "Zr", 6.25000, + "Nb", 7.57000, + "Mo", 6.82000, + "Tc", 6.85000, + "Ru", 6.74000, + "Rh", 5.75000, + "Pd", 3.89000, + "Ag", 2.95000, + "Cd", 1.16000, + "In", 2.52000, + "Sn", 3.14000, + "Sb", 2.75000, + "Te", 2.23000, + "I", 1.11000, + "Xe", 0.16000, + "Cs", 0.80000, + "Ba", 1.90000, + "La", 4.47000, + "Ce", 4.32000, + "Pr", 3.70000, + "Nd", 3.40000, + "Pm", 0.10000, + "Sm", 2.14000, + "Eu", 1.86000, + "Gd", 4.14000, + "Tb", 4.05000, + "Dy", 3.04000, + "Ho", 3.14000, + "Er", 3.29000, + "Tm", 2.42000, + "Yb", 1.60000, + "Lu", 4.43000, + "Hf", 6.44000, + "Ta", 8.10000, + "W", 8.90000, + "Re", 8.03000, + "Os", 8.17000, + "Ir", 6.94000, + "Pt", 5.84000, + "Au", 3.81000, + "Hg", 0.67000, + "Tl", 1.88000, + "Pb", 2.03000, + "Bi", 2.18000, + "Po", 1.50000, + "At", 0.10000, + "Rn", 0.20000, + "Fr", 0.10000, + "Ra", 1.66000, + "Ac", 4.25000, + "Th", 6.20000, + "Pa", 0.10000, + "U", 5.55000, + "", 0.00000 + ); + return $Elast{$El}; +} + +sub Stopicru { + my ($El) = @_; + + my %Stopicru = ( + "H", "1.25400,1.44000,242.60001,12000.00000,0.11590", + "He", "1.22900,1.39700,484.50000,5873.00000,0.05225", + "Li", "1.41100,1.60000,725.59998,3013.00000,0.04578", + "Be", "2.24800,2.59000,966.00000,153.80000,0.03475", + "B", "2.47400,2.81500,1206.00000,1060.00000,0.02855", + "C", "2.60100,2.60100,1701.00000,1279.00000,0.01638", + "N", "2.95400,3.35000,1683.00000,1900.00000,0.02513", + "O", "2.65200,3.00000,1920.00000,2000.00000,0.02230", + "F", "2.08500,2.35200,2157.00000,2634.00000,0.01816", + "Ne", "1.95100,2.19900,2393.00000,2699.00000,0.01568", + "Na", "2.54200,2.86900,2628.00000,1854.00000,0.01472", + "Mg", "3.79100,4.29300,2862.00000,1009.00000,0.01397", + "Al", "4.15400,4.73900,2766.00000,164.50000,0.02023", + "Si", "4.91400,5.59800,3193.00000,232.70000,0.01419", + "P", "3.23200,3.64700,3561.00000,1560.00000,0.01267", + "S", "3.44700,3.89100,3792.00000,1219.00000,0.01211", + "Cl", "5.30100,6.00800,3969.00000,645.09998,0.01183", + "Ar", "5.73100,6.50000,4253.00000,530.00000,0.01123", + "K", "5.15200,5.83300,4482.00000,545.70001,0.01129", + "Ca", "5.52100,6.25200,4710.00000,553.29999,0.01120", + "Sc", "5.20100,5.88400,4938.00000,560.90002,0.01000", + "Ti", "4.85800,5.48900,5260.00000,651.09998,0.00893", + "V", "4.47900,5.05500,5391.00000,952.29999,0.00912", + "Cr", "3.98300,4.48900,5616.00000,1336.00000,0.00841", + "Mn", "3.46900,3.90700,5725.00000,1461.00000,0.00883", + "Fe", "3.51900,3.96300,6065.00000,1243.00000,0.00778", + "Co", "3.14000,3.53500,6288.00000,1372.00000,0.00736", + "Ni", "3.55300,4.00400,6205.00000,555.09998,0.00876", + "Cu", "3.69600,4.19400,4649.00000,81.13000,0.02242", + "Zn", "4.21000,4.75000,6953.00000,295.20001,0.00681", + "Ga", "5.04100,5.69700,7137.00000,202.60001,0.00673", + "Ge", "5.55400,6.30000,6496.00000,110.00000,0.00969", + "As", "5.32300,6.01200,7611.00000,292.50000,0.00645", + "Se", "5.87400,6.65600,7395.00000,117.50000,0.00768", + "Br", "6.65800,7.53600,7694.00000,222.30000,0.00651", + "Kr", "6.41300,7.24000,11850.00000,153.70000,0.00288", + "Rb", "5.69400,6.42900,8478.00000,292.89999,0.00609", + "Sr", "6.33900,7.15900,8693.00000,330.29999,0.00600", + "Y", "6.40700,7.23400,8907.00000,367.79999,0.00589", + "Zr", "6.73400,7.60300,9120.00000,405.20001,0.00576", + "Nb", "6.90100,7.79100,9333.00000,442.70001,0.00559", + "Mo", "6.42400,7.24800,9545.00000,480.20001,0.00538", + "Tc", "6.79900,7.67100,9756.00000,517.59998,0.00532", + "Ru", "6.10900,6.88700,9966.00000,555.09998,0.00515", + "Rh", "5.92400,6.67700,10180.00000,592.50000,0.00492", + "Pd", "5.23800,5.90000,10380.00000,630.00000,0.00476", + "Ag", "5.34500,6.03800,6790.00000,397.79999,0.01676", + "Cd", "5.81400,6.55400,10800.00000,355.50000,0.00463", + "In", "6.22900,7.02400,11010.00000,370.89999,0.00454", + "Sn", "6.40900,7.22700,11210.00000,386.39999,0.00447", + "Sb", "7.50000,8.48000,8608.00000,348.00000,0.00907", + "Te", "6.97900,7.87100,11620.00000,392.39999,0.00440", + "I", "7.72500,8.71600,11830.00000,394.79999,0.00438", + "Xe", "8.33700,9.42500,10510.00000,269.60001,0.00621", + "Cs", "7.28700,8.21800,12230.00000,399.70001,0.00445", + "Ba", "7.89900,8.91100,12430.00000,402.10001,0.00451", + "La", "8.04100,9.07100,12630.00000,404.50000,0.00454", + "Ce", "7.48800,8.44400,12830.00000,406.89999,0.00442", + "Pr", "7.29100,8.21900,13030.00000,409.29999,0.00430", + "Nd", "7.09800,8.00000,13230.00000,411.79999,0.00418", + "Pm", "6.90900,7.78600,13430.00000,414.20001,0.00406", + "Sm", "6.72800,7.58000,13620.00000,416.60001,0.00398", + "Eu", "6.55100,7.38000,13820.00000,419.00000,0.00388", + "Gd", "6.73900,7.59200,14020.00000,421.39999,0.00386", + "Tb", "6.21200,6.99600,14210.00000,423.89999,0.00372", + "Dy", "5.51700,6.21000,14400.00000,426.29999,0.00363", + "Ho", "5.22000,5.87400,14600.00000,428.70001,0.00350", + "Er", "5.07100,5.70600,14790.00000,433.00000,0.00341", + "Tm", "4.92600,5.54200,14980.00000,433.50000,0.00334", + "Yb", "4.78800,5.38600,15170.00000,435.89999,0.00329", + "Lu", "4.89300,5.50500,15360.00000,438.29999,0.00324", + "Hf", "5.02800,5.65700,15550.00000,440.79999,0.00320", + "Ta", "4.73800,5.32900,15740.00000,443.20001,0.00319", + "W", "4.58700,5.16000,15410.00000,415.29999,0.00341", + "Re", "5.20100,5.85100,16120.00000,441.60001,0.00312", + "Os", "5.07100,5.70400,16300.00000,440.89999,0.00308", + "Ir", "4.94600,5.56300,16490.00000,440.10001,0.00296", + "Pt", "4.47700,5.03400,16670.00000,439.29999,0.00287", + "Au", "4.84400,5.45800,7852.00000,975.79999,0.02077", + "Hg", "4.30700,4.84300,17040.00000,487.79999,0.00288", + "Tl", "4.72300,5.31100,17220.00000,537.00000,0.00291", + "Pb", "5.31900,5.98200,17400.00000,586.29999,0.00287", + "Bi", "5.95600,6.70000,17800.00000,677.00000,0.00266", + "Po", "6.15800,6.92800,17770.00000,586.29999,0.00281", + "At", "6.20300,6.97900,17950.00000,586.29999,0.00278", + "Rn", "6.18100,6.95400,18120.00000,586.29999,0.00275", + "Fr", "6.94900,7.82000,18300.00000,586.29999,0.00274", + "Ra", "7.50600,8.44800,18480.00000,586.29999,0.00273", + "Ac", "7.64800,8.60900,18660.00000,586.29999,0.00270", + "Th", "7.71100,8.67900,18830.00000,586.29999,0.00264", + "Pa", "7.40700,8.33600,19010.00000,586.29999,0.00260", + "U", "7.29000,8.20400,19180.00000,586.29999,0.00267", + "", "0.00000,0.00000,0.00000,0.00000,0.00000" + ); + return $Stopicru{$El}; +} + +1; diff --git a/trimsp/TrimSPGUI4/PlotFraction.png b/trimsp/TrimSPGUI4/PlotFraction.png new file mode 100644 index 0000000..923a9fb Binary files /dev/null and b/trimsp/TrimSPGUI4/PlotFraction.png differ diff --git a/trimsp/TrimSPGUI4/PlotProfiles.png b/trimsp/TrimSPGUI4/PlotProfiles.png new file mode 100644 index 0000000..d8f9625 Binary files /dev/null and b/trimsp/TrimSPGUI4/PlotProfiles.png differ diff --git a/trimsp/TrimSPGUI4/TrimSP b/trimsp/TrimSPGUI4/TrimSP new file mode 100755 index 0000000..2f4bb7f --- /dev/null +++ b/trimsp/TrimSPGUI4/TrimSP @@ -0,0 +1,6 @@ +#!/bin/bash +# Copyright 2009-2013 by Zaher Salman and the LEM Group. + +export TRIMBIN=$HOME/bin/trimsp7l +export PERLLIB=$HOME/LEM/simulation/trimsp/TrimSPGUI4 +perl $HOME/LEM/simulation/trimsp/TrimSPGUI4/TrimSPGUI.pl diff --git a/trimsp/TrimSPGUI4/TrimSP.cfg b/trimsp/TrimSPGUI4/TrimSP.cfg new file mode 100644 index 0000000..cde8db9 --- /dev/null +++ b/trimsp/TrimSPGUI4/TrimSP.cfg @@ -0,0 +1,50 @@ + +[Layers] +numLayer=1 +layer1Comp=SrTiO3 +layer1rho=5.12 +layer1d=200 +layer2Comp= +layer2rho= +layer2d= +layer3Comp= +layer3rho= +layer3d= +layer4Comp= +layer4rho= +layer4d= +layer5Comp= +layer5rho= +layer5d= +layer6Comp= +layer6rho= +layer6d= +layer7Comp= +layer7rho= +layer7d= + +[ProjectileParameters] +projType=0 +numberProj= 10000 +z0= 0.00 +dz= 10.00 +valEnergy= 2000.00 +sigEnergy= 450.00 +valAngle= 0.00 +sigAngle= 15.00 +ranSeed= 78741. + +[Files] +fileNamePrefix=SrTiO3 +workPath=./ + +[ScanSequence] +scanSeq= +comboScano= +radioList= +scanList=1000,6000,10000 +scanListdz= +radioLoop=1 +scanFrom=1000 +scanTo=28000 +scanStep=1000 diff --git a/trimsp/TrimSPGUI4/TrimSP.pl b/trimsp/TrimSPGUI4/TrimSP.pl new file mode 100755 index 0000000..7f2a246 --- /dev/null +++ b/trimsp/TrimSPGUI4/TrimSP.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use QtCore4; +use QtGui4; +use TrimSPGUI4; + +sub main { + my $app = Qt::Application(\@ARGV); + my $calculator = TrimSPGUI4(); + $calculator->show(); + exit $app->exec(); +} + +exit main(); diff --git a/trimsp/TrimSPGUI4/TrimSPGUI4.pm b/trimsp/TrimSPGUI4/TrimSPGUI4.pm new file mode 100644 index 0000000..6044557 --- /dev/null +++ b/trimsp/TrimSPGUI4/TrimSPGUI4.pm @@ -0,0 +1,932 @@ +package TrimSPGUI4; + +use strict; +#use warnings; +use QtCore4; +use QtGui4; +use QtCore4::isa qw( Qt::MainWindow ); +use QtCore4::isa qw( Qt::Widget ); + + +use Ui_TrimSPGUI4; + +use QtCore4::slots +# test => [], + ToggleScanSingle => [], + PrepLayers => [], + ProjSmartDefaults => [], + helpAboutAction => [], + helpContentsAction => [], + CollectValues => [], + CreateInpFile => [], + StartSequenceOne => [], + DirectoryBrowse => [], + ConfirmQuit => [], + PlotProfiles => [], + PlotFraction => [], + OpenFile => [], + SaveFile => [], + SaveFileAs => []; + +sub NEW { + my ( $class, $parent ) = @_; + $class->SUPER::NEW($parent); + this->{ui} = Ui_TrimSPGUI4->setupUi(this); + +# this->statusBar()->addWidget(Qt::Label(this->tr(""))); +} + +# Function: return widget attribute given its type and name +sub child { +# Take type and name from input + my ( $object, $name ) = @_; + my $Attrib = this->findChildren($object, $name); + $Attrib = @{$Attrib}[0]; +# Return handle on widget + return $Attrib +} + +# Subroutine: Toggle between scan/single run mode and setup scans tab +sub ToggleScanSingle() +{ +# First collect some information + my %All=(); + $All{"scanSeq"}=this->{ui}->scanSeq->isChecked(); + $All{"comboScan"}=this->{ui}->comboScan->currentIndex(); + $All{"scandL"}=this->{ui}->scandL->text(); + $All{"numLayer"}=this->{ui}->numLayer->text(); + $All{"radioList"}=this->{ui}->radioList->isChecked(); + $All{"radioLoop"}=this->{ui}->radioLoop->isChecked(); + +# Enable everything + this->{ui}->valEnergy->setDisabled(0); + this->{ui}->sigEnergy->setDisabled(0); + this->{ui}->valAngle->setDisabled(0); + this->{ui}->sigAngle->setDisabled(0); + this->{ui}->numberProj->setDisabled(0); + + this->{ui}->scandL->setHidden(1); + if ($All{"comboScan"}==5) { + this->{ui}->scandL->setHidden(0); + this->{ui}->scandL->setDisabled(0); + } + +# Enable depth increment for Energy scan + if ($All{"radioList"}) { + this->{ui}->scanList->setDisabled(0); + this->{ui}->scanFrom->setDisabled(1); + this->{ui}->scanTo->setDisabled(1); + this->{ui}->scanStep->setDisabled(1); + if ($All{"comboScan"}==0) { + this->{ui}->dzListLabel->setHidden(0); + this->{ui}->scanListdz->setHidden(0); + this->{ui}->dzListLabel->setDisabled(0); + this->{ui}->scanListdz->setDisabled(0); + this->{ui}->dzListLabel->setText("Corresponding depth increment (optional)"); +# Enable energy change sigma angle scans + } elsif ($All{"comboScan"}==3) { + this->{ui}->dzListLabel->setHidden(0); + this->{ui}->scanListdz->setHidden(0); + this->{ui}->dzListLabel->setDisabled(0); + this->{ui}->scanListdz->setDisabled(0); + this->{ui}->dzListLabel->setText("Corresponding energy"); + } else { +# Otherwise keep it hidden + this->{ui}->dzListLabel->setHidden(1); + this->{ui}->scanListdz->setHidden(1); + this->{ui}->dzListLabel->setDisabled(1); + this->{ui}->scanListdz->setDisabled(1); + } + } elsif ($All{"radioLoop"}) { + this->{ui}->scanList->setDisabled(1); + this->{ui}->scanFrom->setDisabled(0); + this->{ui}->scanTo->setDisabled(0); + this->{ui}->scanStep->setDisabled(0); + this->{ui}->dzListLabel->setHidden(1); + this->{ui}->scanListdz->setHidden(1); + this->{ui}->dzListLabel->setDisabled(1); + this->{ui}->scanListdz->setDisabled(1); + } + +# Start by enabling everything on the first tab + this->{ui}->valEnergy->setDisabled(0); + this->{ui}->sigEnergy->setDisabled(0); + this->{ui}->valAngle->setDisabled(0); + this->{ui}->sigAngle->setDisabled(0); + this->{ui}->numberProj->setDisabled(0); +# Also layer thicknesses + for (my $i=1;$i<=7;$i++) { + my $LayerThickName = "layer".$i."d"; + my $LayerThickAttrib = child("Qt::LineEdit",$LayerThickName); + $LayerThickAttrib->setDisabled(0); + } + + if ($All{"scanSeq"}) { +# Change title of tab to say enabled + this->{ui}->tabs->setTabText(2,"Scans (Enabled)"); + +# If scanning layer thickness make sure it is actually defined + if ($All{"scandL"} > $All{"numLayer"}) { + Qt::MessageBox::warning( this, "Warning!","Define layers first!"); + } + +# Disable the appropriate box in the first tab. + if ($All{"comboScan"}==0) { + this->{ui}->valEnergy->setDisabled(1); + } elsif ($All{"comboScan"}==1) { + this->{ui}->sigEnergy->setDisabled(1); + } elsif ($All{"comboScan"}==2) { + this->{ui}->valAngle->setDisabled(1); + } elsif ($All{"comboScan"}==3) { + this->{ui}->sigAngle->setDisabled(1); + } elsif ($All{"comboScan"}==4) { + this->{ui}->numberProj->setDisabled(1); + } elsif($All{"comboScan"}==5) { + my $LayerThickName = "layer".$All{"scandL"}."d"; + my $LayerThickAttrib = child("Qt::LineEdit",$LayerThickName); + $LayerThickAttrib->setDisabled(1); + } + } else { +# Otherwise the title of the tab says disabled + this->{ui}->tabs->setTabText(2,"Scans (Disabled)"); + } +} + + +# Subroutine: Enable layers up to required and disable the rest +sub PrepLayers() +{ + my %All=(); +# Get number of layers to define + $All{"numLayer"}=this->{ui}->numLayer->value(); +# Enable required number + for (my $i=2;$i<=7;$i++) { + my $LayerName = "boxL".$i; + my $LayerAttrib = child("Qt::GroupBox",$LayerName); + if ($i<=$All{"numLayer"}) { + $LayerAttrib->setDisabled(0); + } else { + $LayerAttrib->setDisabled(1); + } + } +} + +# Subroutine: Set sane default values for projectile energy distribution and angles +sub ProjSmartDefaults() +{ + my %All=(); +# Get typeof projectile + $All{"projComboBox"}=this->{ui}->projComboBox->currentIndex(); + if ($All{"projComboBox"}==0) { +# For a muon set Sigma E=450 eV and Sigman angle=15 degrees by default + this->{ui}->sigEnergy->setText("450"); + this->{ui}->sigAngle->setText("15"); + } else { +# For Li8 (or ions) set Sigma E=0 eV and Sigam angle=0 degrees by default + this->{ui}->sigEnergy->setText("0"); + this->{ui}->sigAngle->setText("0"); + } +} + + +# Function: Returns a hash with all the values collected from the GUI. +sub CollectValues() +{ + my %All=(); + $All{"numLayer"}=this->{ui}->numLayer->value(); +# Collect layers parameters + for (my $i=1;$i<=$All{"numLayer"};$i++) { + my $LComp = "layer".$i."Comp"; + my $Lrho="layer".$i."rho"; + my $Ld="layer".$i."d"; + my $LCompAttrib = child("Qt::LineEdit",$LComp); + my $LrhoAttrib = child("Qt::LineEdit",$Lrho); + my $LdAttrib = child("Qt::LineEdit",$Ld); + $All{"$LComp"}=$LCompAttrib->text(); + $All{"$Lrho"}=$LrhoAttrib->text(); + $All{"$Ld"}=$LdAttrib->text(); + } + +# Collect projectile parameters + $All{"projComboBox"}=this->{ui}->projComboBox->currentIndex(); + $All{"numberProj"}=this->{ui}->numberProj->text(); + if ($All{"numberProj"}==0) { + $All{"numberProj"}=10000; + this->{ui}->numberProj->setText("10000"); + } + $All{"z0"}=this->{ui}->z0->text(); + $All{"dz"}=this->{ui}->dz->text(); + $All{"valEnergy"}=this->{ui}->valEnergy->text(); + $All{"sigEnergy"}=this->{ui}->sigEnergy->text(); + $All{"valAngle"}=this->{ui}->valAngle->text(); + $All{"sigAngle"}=this->{ui}->sigAngle->text(); + $All{"ranSeed"}=this->{ui}->ranSeed->text(); +# Format projectile parameters + $All{"numberProj"}=sprintf("%8d",$All{"numberProj"}); + $All{"z0"}=sprintf("%6.2f",$All{"z0"}); + $All{"dz"}=sprintf("%6.2f",$All{"dz"}); + $All{"valEnergy"}=sprintf("%11.2f",$All{"valEnergy"}); + $All{"sigEnergy"}=sprintf("%8.2f",$All{"sigEnergy"}); + $All{"valAngle"}=sprintf("%8.2f",$All{"valAngle"}); + $All{"sigAngle"}=sprintf("%8.2f",$All{"sigAngle"}); + $All{"ranSeed"}=sprintf("%6.0f.",$All{"ranSeed"}); + + +# Collect the additional parameters + $All{"parEF"}=this->{ui}->parEF->text(); + $All{"parESB"}=this->{ui}->parESB->text(); + $All{"parSHEATH"}=this->{ui}->parSHEATH->text(); + $All{"parERC"}=this->{ui}->parERC->text(); + $All{"parRD"}=this->{ui}->parRD->text(); + $All{"parCA"}=this->{ui}->parCA->text(); + $All{"parKK0"}=this->{ui}->parKK0->text(); + $All{"parKK0R"}=this->{ui}->parKK0R->text(); + $All{"parKDEE1"}=this->{ui}->parKDEE1->text(); + $All{"parKDEE2"}=this->{ui}->parKDEE2->text(); + $All{"parIPOT"}=this->{ui}->parIPOT->text(); + $All{"parIPOTR"}=this->{ui}->parIPOTR->text(); + $All{"parIRL"}=this->{ui}->parIRL->text(); +# format additional parameters + $All{"parEF"}=sprintf("%8.2f",$All{"parEF"}); + $All{"parESB"}=sprintf("%8.2f",$All{"parESB"}); + $All{"parSHEATH"}=sprintf("%8.2f",$All{"parSHEATH"}); + $All{"parERC"}=sprintf("%8.2f",$All{"parERC"}); + $All{"parRD"}=sprintf("%5.0f.",$All{"parRD"}); + $All{"parCA"}=sprintf("%6.2f",$All{"parCA"}); + $All{"parKK0"}=sprintf("%3d",$All{"parKK0"}); + $All{"parKK0R"}=sprintf("%3d",$All{"parKK0R"}); + $All{"parKDEE1"}=sprintf("%3d",$All{"parKDEE1"}); + $All{"parKDEE2"}=sprintf("%3d",$All{"parKDEE2"}); + $All{"parIPOT"}=sprintf("%3d",$All{"parIPOT"}); + $All{"parIPOTR"}=sprintf("%3d",$All{"parIPOTR"}); + $All{"parIRL"}=sprintf("%2d",$All{"parIRL"}); + +# Filenames etc. The filename should not have white spaces + $All{"fileNamePrefix"}=this->{ui}->fileNamePrefix->text(); + $All{"fileNamePrefix"}=~ s/\s+//g; + $All{"workPath"}=this->{ui}->workPath->text(); + +# Scan parameters only if selected + $All{"scanSeq"}=this->{ui}->scanSeq->isChecked(); + $All{"comboScan"}=this->{ui}->comboScan->currentIndex(); + $All{"scandL"}=this->{ui}->scandL->value(); + $All{"radioList"}=this->{ui}->radioList->isChecked(); + $All{"radioLoop"}=this->{ui}->radioLoop->isChecked(); + $All{"scanList"}=this->{ui}->scanList->text(); +# Remove any white spaces + $All{"scanList"} =~ s/\s+//g; + $All{"scanListdz"}=this->{ui}->scanListdz->text(); +# Remove any white spaces + $All{"scanListdz"} =~ s/\s+//g; +# These should be numeric + $All{"scanFrom"}=this->{ui}->scanFrom->text(); + $All{"scanTo"}=this->{ui}->scanTo->text(); + $All{"scanStep"}=this->{ui}->scanStep->text(); + $All{"scanFrom"}=1*$All{"scanFrom"}; + $All{"scanTo"}=1*$All{"scanTo"}; + $All{"scanStep"}=1*$All{"scanStep"}; + +# Return values to caller + return %All; +} + +# Function: Create and return input file for the Trim.SP simulation +# binary +sub CreateInpFile() +{ +# use lib '$ENV{HOME}/Projects/TrimSPGUI/Chem'; +# push @INC, "$ENV{HOME}/Projects/TrimSPGUI"; + use Chem; +# The proper way I think is not to have scan sequences implimented +# here but rather call this multiple times to generate the scan. To +# achieve this, the function CreateInpFile will expect a unique +# thickness for each layer, one energy value, one energy sigma and one +# projectile number. These will be stored in keys layer1/2/3/4/5/6/7d, +# valEnergy, sigEnergy and numberProj, respectively. + +# Chemical formulas will be parsed on the fly for each layer. However, +# I will check if all the layers have inputs for composition, +# thickness and density. If not complain and stop :) + +# Values of Z,A as well as other needed parameters are obtained from +# Chem.pm. + +# This is the form of the input file: + my $TemplateFile= + " ProjZ ProjAM valEnergy sigEnergy valAngle sigAngle parEF parESB parSHEATH parERC + numberProj ranSeed ranSeed ranSeed z0 parRD dz parCA parKK0 parKK0R parKDEE1 parKDEE2 parIPOT parIPOTR parIRL + layer1d layer2d layer3d layer4d layer5d layer6d layer7d layer1rho layer2rho layer3rho layer4rho layer5rho layer6rho layer7rho L1CK L2CK L3CK L4CK L5CK L6CK L7CK + L1ELZ1 L1ELZ2 L1ELZ3 L1ELZ4 L1ELZ5 + L1ELW1 L1ELW2 L1ELW3 L1ELW4 L1ELW5 + L1ELC1 L1ELC2 L1ELC3 L1ELC4 L1ELC5 + L1ELE1 L1ELE2 L1ELE3 L1ELE4 L1ELE5 + L10301 L10302 L10303 L10304 L10305 + 0.0000 0.0000 0.0000 0.0000 0.0000 + L1ELST11 L1ELST21 L1ELST31 L1ELST41 L1ELST51 + L1ELST12 L1ELST22 L1ELST32 L1ELST42 L1ELST52 + L1ELST13 L1ELST23 L1ELST33 L1ELST43 L1ELST53 + L1ELST14 L1ELST24 L1ELST34 L1ELST44 L1ELST54 + L1ELST15 L1ELST25 L1ELST35 L1ELST45 L1ELST55 + L2ELZ1 L2ELZ2 L2ELZ3 L2ELZ4 L2ELZ5 + L2ELW1 L2ELW2 L2ELW3 L2ELW4 L2ELW5 + L2ELC1 L2ELC2 L2ELC3 L2ELC4 L2ELC5 + L2ELE1 L2ELE2 L2ELE3 L2ELE4 L2ELE5 + L20301 L20302 L20303 L20304 L20305 + 0.0000 0.0000 0.0000 0.0000 0.0000 + L2ELST11 L2ELST21 L2ELST31 L2ELST41 L2ELST51 + L2ELST12 L2ELST22 L2ELST32 L2ELST42 L2ELST52 + L2ELST13 L2ELST23 L2ELST33 L2ELST43 L2ELST53 + L2ELST14 L2ELST24 L2ELST34 L2ELST44 L2ELST54 + L2ELST15 L2ELST25 L2ELST35 L2ELST45 L2ELST55 + L3ELZ1 L3ELZ2 L3ELZ3 L3ELZ4 L3ELZ5 + L3ELW1 L3ELW2 L3ELW3 L3ELW4 L3ELW5 + L3ELC1 L3ELC2 L3ELC3 L3ELC4 L3ELC5 + L3ELE1 L3ELE2 L3ELE3 L3ELE4 L3ELE5 + L30301 L30302 L30303 L30304 L30305 + 0.0000 0.0000 0.0000 0.0000 0.0000 + L3ELST11 L3ELST21 L3ELST31 L3ELST41 L3ELST51 + L3ELST12 L3ELST22 L3ELST32 L3ELST42 L3ELST52 + L3ELST13 L3ELST23 L3ELST33 L3ELST43 L3ELST53 + L3ELST14 L3ELST24 L3ELST34 L3ELST44 L3ELST54 + L3ELST15 L3ELST25 L3ELST35 L3ELST45 L3ELST55 + L4ELZ1 L4ELZ2 L4ELZ3 L4ELZ4 L4ELZ5 + L4ELW1 L4ELW2 L4ELW3 L4ELW4 L4ELW5 + L4ELC1 L4ELC2 L4ELC3 L4ELC4 L4ELC5 + L4ELE1 L4ELE2 L4ELE3 L4ELE4 L4ELE5 + L40301 L40302 L40303 L40304 L40305 + 0.0000 0.0000 0.0000 0.0000 0.0000 + L4ELST11 L4ELST21 L4ELST31 L4ELST41 L4ELST51 + L4ELST12 L4ELST22 L4ELST32 L4ELST42 L4ELST52 + L4ELST13 L4ELST23 L4ELST33 L4ELST43 L4ELST53 + L4ELST14 L4ELST24 L4ELST34 L4ELST44 L4ELST54 + L4ELST15 L4ELST25 L4ELST35 L4ELST45 L4ELST55 + L5ELZ1 L5ELZ2 L5ELZ3 L5ELZ4 L5ELZ5 + L5ELW1 L5ELW2 L5ELW3 L5ELW4 L5ELW5 + L5ELC1 L5ELC2 L5ELC3 L5ELC4 L5ELC5 + L5ELE1 L5ELE2 L5ELE3 L5ELE4 L5ELE5 + L50301 L50302 L50303 L50304 L50305 + 0.0000 0.0000 0.0000 0.0000 0.0000 + L5ELST11 L5ELST21 L5ELST31 L5ELST41 L5ELST51 + L5ELST12 L5ELST22 L5ELST32 L5ELST42 L5ELST52 + L5ELST13 L5ELST23 L5ELST33 L5ELST43 L5ELST53 + L5ELST14 L5ELST24 L5ELST34 L5ELST44 L5ELST54 + L5ELST15 L5ELST25 L5ELST35 L5ELST45 L5ELST55 + L6ELZ1 L6ELZ2 L6ELZ3 L6ELZ4 L6ELZ5 + L6ELW1 L6ELW2 L6ELW3 L6ELW4 L6ELW5 + L6ELC1 L6ELC2 L6ELC3 L6ELC4 L6ELC5 + L6ELE1 L6ELE2 L6ELE3 L6ELE4 L6ELE5 + L60301 L60302 L60303 L60304 L60305 + 0.0000 0.0000 0.0000 0.0000 0.0000 + L6ELST11 L6ELST21 L6ELST31 L6ELST41 L6ELST51 + L6ELST12 L6ELST22 L6ELST32 L6ELST42 L6ELST52 + L6ELST13 L6ELST23 L6ELST33 L6ELST43 L6ELST53 + L6ELST14 L6ELST24 L6ELST34 L6ELST44 L6ELST54 + L6ELST15 L6ELST25 L6ELST35 L6ELST45 L6ELST55 + L7ELZ1 L7ELZ2 L7ELZ3 L7ELZ4 L7ELZ5 + L7ELW1 L7ELW2 L7ELW3 L7ELW4 L7ELW5 + L7ELC1 L7ELC2 L7ELC3 L7ELC4 L7ELC5 + L7ELE1 L7ELE2 L7ELE3 L7ELE4 L7ELE5 + L70301 L70302 L70303 L70304 L70305 + 0.0000 0.0000 0.0000 0.0000 0.0000 + L7ELST11 L7ELST21 L7ELST31 L7ELST41 L7ELST51 + L7ELST12 L7ELST22 L7ELST32 L7ELST42 L7ELST52 + L7ELST13 L7ELST23 L7ELST33 L7ELST43 L7ELST53 + L7ELST14 L7ELST24 L7ELST34 L7ELST44 L7ELST54 + L7ELST15 L7ELST25 L7ELST35 L7ELST45 L7ELST55 + "; + +# Get values from form + my %All = CollectValues(); + my $projComboBox=$All{"projComboBox"}; + $All{"ProjZ"}=sprintf("%6.2f",Chem::Zof($projComboBox)); + $All{"ProjAM"}=sprintf("%6.2f",Chem::Massof($projComboBox)); + +# This is the flag for checking layers + my $Check=0; +# Loop over layers an create appropriate values + for (my $i=1;$i<=7;$i++){ + $Check=0; +# Composition of layers + my $LComp="layer".$i."Comp"; + my $LCompAttrib = child("Qt::LineEdit",$LComp); + my $Comp = $LCompAttrib->text(); + my %LElComp=Chem::parse_formula($Comp); + if ($Comp eq "") {$Check++;} + +# Densities of layers + my $Lrho="layer".$i."rho"; + my $LrhoAttrib = child("Qt::LineEdit",$Lrho); + my $rho = 1*$LrhoAttrib->text(); + $All{$Lrho}=sprintf("%6.2f",$rho); + if ($rho eq "") {$Check++;} + +# Thickness of layers + my $Ld ="layer".$i."d"; + my $LdAttrib = child("Qt::LineEdit",$Ld); + my $d = $LdAttrib->text(); + $All{$Ld}=sprintf("%8.2f",$d); + if ($d eq "") {$Check++;} + +# Sanity check, is the layer supposed to have value? are they all there? + if ($Check!=0 & $i<=$All{"numLayer"}) { + my $ErrMsg="Error: Layer $i is empty. Expecting it to be defined!\n"; + print STDERR $ErrMsg; + my $HelpWindow = Qt::MessageBox::information( this, "Error!",$ErrMsg); + return "ERROR"; + } + + my $tmp = "L".$i."CK"; + $All{$tmp}=sprintf("%6.2f",1.0); + + my $Sum = 0; + foreach (keys %LElComp) { + $Sum=$Sum+$LElComp{$_}; + } + if ($Sum==0) {$Sum=1;} + +# print STDOUT "Layer: ".$i."\n"; +# print STDOUT "Composition: ".$Comp."\n"; + + my @Els = keys %LElComp; + + for (my $NEl=1;$NEl<=5;$NEl++) { + my $El = $Els[$NEl-1]; + my $LEkey = "L".$i."EL"; + my $ElZ = Chem::Zof($El); + my $ElW = Chem::Massof($El); + my $ElC = $LElComp{$El}/$Sum; + my $ElE = Chem::Elastof($El); + my $El030 = 30; + if ($El eq "") { $El030 = 0.0;} +# print STDOUT "$El, ElC=$ElC ElZ=$ElZ ElW=$ElW ElE=$ElE\n"; + $All{$LEkey."Z".$NEl}=sprintf("%8.4f",$ElZ); + $All{$LEkey."W".$NEl}=sprintf("%8.4f",$ElW); + $All{$LEkey."C".$NEl}=sprintf("%8.4f",$ElC); + $All{$LEkey."E".$NEl}=sprintf("%8.4f",$ElE); + $All{"L".$i."030".$NEl}=sprintf("%8.4f",$El030); + + my $ElST = Chem::Stopicru($El); + my @ElSTs = split (/,/,$ElST); + my $j=1; + foreach (@ElSTs) { + $LEkey = "L".$i."ELST".$NEl.$j; + $j++; + $All{$LEkey}=sprintf("%11.6f",$_); + } + } + } + + foreach my $key (keys %All) { +# print $key,$All{$key},"\n"; + if ($All{$key} ne ""){ + $TemplateFile =~ s/$key/$All{$key}/; +# Seed repeats three times + if ($key eq "ranSeed") { $TemplateFile =~ s/$key/$All{$key}/g;} + } + } + return $TemplateFile; +} + + +# Subroutine: Start the simulation with the current parameters +sub StartSequenceOne() +{ + my %All = CollectValues(); + my @SValues=(); + my @SdzValues=(); + my $cmd=""; + +# Cleanup from old files + if (-e "ausgabe1.inp") { + system("rm -f ausgabe*"); + } + + my $Progress=0; + if ($All{"scanSeq"}) { + if ($All{"radioList"}) { + @SValues=split(/,/,$All{"scanList"}); + @SdzValues=split(/,/,$All{"scanListdz"}); + if ($#SValues == $#SdzValues) {$All{"SdzFlag"}=1;} + } elsif ($All{"radioLoop"}) { + for (my $Val=$All{"scanFrom"};$Val<=$All{"scanTo"};$Val=$Val+$All{"scanStep"}) { + @SValues=(@SValues,$Val); + } + } + + my $ScanName = ""; + my $ScanVar = ""; + if ($All{"comboScan"}==0) { + $ScanName = "E"; + $ScanVar = "valEnergy"; + } elsif ($All{"comboScan"}==1) { + $ScanName = "SigE"; + $ScanVar = "sigEnergy"; + } elsif ($All{"comboScan"}==2) { + $ScanName = "Angle"; + $ScanVar = "valAngle"; + } elsif ($All{"comboScan"}==3) { + $ScanName = "SigAngle"; + $ScanVar = "sigAngle"; + } elsif ($All{"comboScan"}==4) { + $ScanName = "N"; + $ScanVar = "numberProj"; + } elsif ($All{"comboScan"}==5) { + $ScanName = "Ld".$All{"scandL"}; + $ScanVar = "layer".$All{"scandL"}."d"; + } + + my $ScanAttrib = child("Qt::LineEdit",$ScanVar); + my $iScan=0; + foreach (@SValues) { + $ScanAttrib->setText($_); + if ( $All{"SdzFlag"} == 1) { + if ($All{"comboScan"}==0) { + this->{ui}->dz->setText($SdzValues[$iScan]); + } elsif ($All{"comboScan"}==3) { + this->valEnergy->setText($SdzValues[$iScan]); + } + } + my $eingabe1=CreateInpFile(); + if ($eingabe1 eq "ERROR") {return 0;} + my $FILENAME=$All{"fileNamePrefix"}."_".$ScanName.$_; + open (INPF,q{>}, "$FILENAME.inp" ); + print INPF $eingabe1; + close(INPF); +# Use windoz version +# system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe"); +# Use Linux version + $Progress=$Progress+90/$#SValues; + this->{ui}->progress->setValue($Progress); + this->{ui}->progress->update(); + $cmd = "cp $FILENAME.inp eingabe1.inp; ".$ENV{'TRIMBIN'}; + system($cmd); + + foreach ("err","out","rge") { + system("mv -f ausgabe1.$_ $FILENAME.$_"); + } +# Not needed if work path is changed +# $cmd="mv -f $FILENAME.* ".$All{"workPath"}; +# system($cmd); + $iScan++; + } + } else { +# For a single run + my $eingabe1=CreateInpFile(); + if ($eingabe1 eq "ERROR") {return 0;} + my $FILENAME=$All{"fileNamePrefix"}; + open (INPF,q{>}, "$FILENAME.inp" ); + print INPF $eingabe1; + close(INPF); + $Progress=20; + this->{ui}->progress->setValue($Progress); + +# Use windoz version +# system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe"); +# Use Linux version + $cmd = "cp $FILENAME.inp eingabe1.inp; ".$ENV{'TRIMBIN'}; + system($cmd); + foreach ("err","out","rge") { + system("mv -f ausgabe1.$_ $FILENAME.$_"); + } + $Progress=90; + this->{ui}->progress->setValue($Progress); +# If we change work directory this is not needed +# $cmd="mv -f $FILENAME.* ".$All{"workPath"}; +# system($cmd); + } +# Move the fort.33 file into the subdirectory and change its name + $cmd="rm -f eingabe1.inp; mv -f fort.33 ".$All{"workPath"}."/".$All{"fileNamePrefix"}."_Seq_Results.dat"; + system($cmd); + $Progress=100; + this->{ui}->progress->setValue($Progress); + return 1; +} + + +# Subroutine: Select or create work directory +sub DirectoryBrowse() +{ + my $Path = this->{ui}->workPath->text(); + my $FileBrowser = Qt::FileDialog::getExistingDirectory( + this, + "Choose a directory", + $Path, + 1); + + if ($FileBrowser ne "") { + this->{ui}->workPath->setText($FileBrowser); + } + +# Create a subdirectory where all input/output files are saved + my $cmd=""; + if (-d $FileBrowser) { +# Directory exists, do nothing + } else { + $cmd="mkdir $FileBrowser"; + system($cmd); + } +# Change work directory accordingly + chdir ("$FileBrowser"); +} + + +# Subroutine: Quit dialog with confirmation +sub ConfirmQuit() +{ + my $Ans = Qt::MessageBox::question( this, "Quit?","Are you sure you want to quit?","&Yes","&No","",0,1); + if ($Ans==0) { +# Then quit + Qt::Application::exit( 0 ); + } +# Otherwize go back +} + +# From here it is all menu actions + +# Subroutine: Open a configuration file +sub OpenFile() +{ +# Types of different input + my %Types = (); + $Types{"numLayer"}="Qt::SpinBox"; + $Types{"projComboBox"}="Qt::ComboBox"; + $Types{"scanSeq"}="Qt::RadioButton"; + $Types{"comboScan"}="Qt::ComboBox"; + $Types{"scandL"}="Qt::SpinBox"; + $Types{"radioList"}="Qt::RadioButton"; + $Types{"scanListdz"}="Qt::LineEdit"; + $Types{"radioLoop"}="Qt::RadioButton"; + $Types{"scanSeq"}="Qt::GroupBox"; + + my $file=Qt::FileDialog::getOpenFileName( + this, + "Choose an initialization file", + ".", + "Initialization file (.* *.*)"); + +# If the user gave a valid filename try to read it + if ($file ne "") { + open (INF,q{<},"$file" ); + my @lines = ; + close(INF); + my $Attrib=""; + foreach my $line (@lines) { +# Remove white spaces + $line =~ s/\s+//g; + my @InitPar = split (/=/,$line); +# Check it is not empty or title line + if ($InitPar[0] || $InitPar[1]) { + if (!$Types{$InitPar[0]}) { + $Types{$InitPar[0]}="Qt::LineEdit"; + } +# Get widget by name + $Attrib = child($Types{$InitPar[0]},$InitPar[0]); +# if the widget exists + if ($Attrib){ + if ($Types{$InitPar[0]} eq "Qt::SpinBox") { + $Attrib->setValue($InitPar[1]); + } elsif ($Types{$InitPar[0]} eq "Qt::RadioButton" || $Types{$InitPar[0]} eq "Qt::GroupBox") { + if($InitPar[1]) { + $Attrib->setChecked(1); + } else { + $Attrib->setChecked(0); + } + } elsif ($Types{$InitPar[0]} eq "Qt::ComboBox") { + $Attrib-> setCurrentIndex($InitPar[1]); + } else { + $Attrib->setText($InitPar[1]); + } + } + } + } + } +} + +# Subroutine: Save configuration file to TrimSP.cfg +sub SaveFile() +{ + my %All = CollectValues(); + my $InitFile=" +[Layers] +numLayer=$All{'numLayer'} +layer1Comp=$All{'layer1Comp'} +layer1rho=$All{'layer1rho'} +layer1d=$All{'layer1d'} +layer2Comp=$All{'layer2Comp'} +layer2rho=$All{'layer2rho'} +layer2d=$All{'layer2d'} +layer3Comp=$All{'layer3Comp'} +layer3rho=$All{'layer3rho'} +layer3d=$All{'layer3d'} +layer4Comp=$All{'layer4Comp'} +layer4rho=$All{'layer4rho'} +layer4d=$All{'layer4d'} +layer5Comp=$All{'layer5Comp'} +layer5rho=$All{'layer5rho'} +layer5d=$All{'layer5d'} +layer6Comp=$All{'layer6Comp'} +layer6rho=$All{'layer6rho'} +layer6d=$All{'layer6d'} +layer7Comp=$All{'layer7Comp'} +layer7rho=$All{'layer7rho'} +layer7d=$All{'layer7d'} + +[ProjectileParameters] +projComboBox=$All{'projComboBox'} +numberProj=$All{'numberProj'} +z0=$All{'z0'} +dz=$All{'dz'} +valEnergy=$All{'valEnergy'} +sigEnergy=$All{'sigEnergy'} +valAngle=$All{'valAngle'} +sigAngle=$All{'sigAngle'} +ranSeed=$All{'ranSeed'} + +[Files] +fileNamePrefix=$All{'fileNamePrefix'} +workPath=$All{'workPath'} + +[ScanSequence] +scanSeq=$All{'scanSeq'} +comboScan=$All{'comboScan'} +radioList=$All{'radioList'} +scanList=$All{'scanList'} +scanListdz=$All{'scanListdz'} +radioLoop=$All{'radioLoop'} +scanFrom=$All{'scanFrom'} +scanTo=$All{'scanTo'} +scanStep=$All{'scanStep'} +"; + +# Save to default file name "TriumSP.cfg" + my $file = "TrimSP.cfg"; + open (OUTF,q{>},"$file" ); + print OUTF (" $InitFile"); + close(OUTF); +} + +# Subroutine: Save As configuration file +sub SaveFileAs() +{ + my %All = CollectValues(); + my $InitFile=" +[Layers] +numLayer=$All{'numLayer'} +layer1Comp=$All{'layer1Comp'} +layer1rho=$All{'layer1rho'} +layer1d=$All{'layer1d'} +layer2Comp=$All{'layer2Comp'} +layer2rho=$All{'layer2rho'} +layer2d=$All{'layer2d'} +layer3Comp=$All{'layer3Comp'} +layer3rho=$All{'layer3rho'} +layer3d=$All{'layer3d'} +layer4Comp=$All{'layer4Comp'} +layer4rho=$All{'layer4rho'} +layer4d=$All{'layer4d'} +layer5Comp=$All{'layer5Comp'} +layer5rho=$All{'layer5rho'} +layer5d=$All{'layer5d'} +layer6Comp=$All{'layer6Comp'} +layer6rho=$All{'layer6rho'} +layer6d=$All{'layer6d'} +layer7Comp=$All{'layer7Comp'} +layer7rho=$All{'layer7rho'} +layer7d=$All{'layer7d'} + +[ProjectileParameters] +projComboBox=$All{'projComboBox'} +numberProj=$All{'numberProj'} +z0=$All{'z0'} +dz=$All{'dz'} +valEnergy=$All{'valEnergy'} +sigEnergy=$All{'sigEnergy'} +valAngle=$All{'valAngle'} +sigAngle=$All{'sigAngle'} +ranSeed=$All{'ranSeed'} + +[Files] +fileNamePrefix=$All{'fileNamePrefix'} +workPath=$All{'workPath'} + +[ScanSequence] +scanSeq=$All{'scanSeq'} +comboScan=$All{'comboScan'} +radioList=$All{'radioList'} +scanList=$All{'scanList'} +scanListdz=$All{'scanListdz'} +radioLoop=$All{'radioLoop'} +scanFrom=$All{'scanFrom'} +scanTo=$All{'scanTo'} +scanStep=$All{'scanStep'} +"; + + my $file=Qt::FileDialog::getSaveFileName( + this, + "Choose a filename to save", + "TrimSP.cfg", + "TrimSP GUI Initialization file (*.cfg)"); + +# If the user gave a filename the copy to it + if ($file ne "") { + open (OUTF,q{>},"$file" ); + print OUTF (" $InitFile"); + close(OUTF); + } +} + +# Subroutine: Plot implantation profiles using root macro +sub PlotProfiles() +{ + my $Path=this->{ui}->workPath->text(); + my $files_ref=Qt::FileDialog::getOpenFileNames( + this, + "Select RGE files to plot", + $Path, + "RGE Files (*.rge)"); + + my @files_tmp = @$files_ref; +# Do "natural" sorting on the file name list +# This will produce (hopefully) a plot with largest needed depth scale + my @files = grep {s/(^|\D)0+(\d)/$1$2/g,1} sort grep {s/(\d+)/sprintf"%06.6d",$1/ge,1} @files_tmp; + + my $filenames=join(",",@files); + + if ($filenames ne "" ) { + my $TrimPath = $ENV{'PERLLIB'}; +# Now that we have the file list send it to root macro for plotting. + my $cmd='root -n -l "'.$TrimPath.'/plotRge.C(\"'.$filenames.'\")"&'; + my $pid=system($cmd); + } +} + +# Subroutine: Plot implantation fractions in the different layers using +# a root macro +sub PlotFraction() +{ + my $Path=this->{ui}->workPath->text(); + my $file=Qt::FileDialog::getOpenFileName( + this, + "Choose a sequence data file", + $Path, + "Implantation sequence file (*.dat)"); + + if ($file ne "" ) { + my $TrimPath = $ENV{'PERLLIB'}; +# Now that we have the file name send it to root macro for plotting. + my $cmd='root -n -l "'.$TrimPath.'/plotFrc.C(\"'.$file.'\")"&'; + + my $pid=system($cmd); + } + +} + +# Subroutine: Help window contents +sub helpContentsAction() +{ + my $HelpText=" +This is a GUI that uses the Trim.SP simulation binary to calculate the implantation profiles of implanted projectiles in a multilayer thin film structure. + +Usage: + + Initially define your multilayer structure in the 'Layers' tab. This can be formed of a maximum of 7 layers. Each layer is defined by giving its chemical formula, its density in units of g/cm^3, and its thickness in Ångström. + + Next, choose the type of projectile to be implanted in the structure from the drop-down menu. Set the 'Number of projectiles' to be implanted, were a higher number will give better statistics. Finally define the rest of the projectile parameters such as implantation energy, energy spread, etc. + + In the 'File names prefix' give a string which will be used to construct the input/output file names of the simulation. These files will be collected and saved in the subdirectory provided in 'Save in subdirectory' box. + + The 'Additional Parameters' tab allows you to change additional parameters in the simulation. Change these only if you know what you are doing, and have read the original documentation of the Trim.SP simulation. + + The 'Scans' tabs provides the ability to change the value of a certain parameter in the simulation, such as implantation energy, spread in energy, number of implanted projectiles, and the thickness of one layer. The values of this parameter can be changed by a regualr step size ('Loop' checkbox and parameters), or following a set of values ('List of values' checkbox and the comma separated values). In the second case, in addition to the scanned parameter, the user may be given an option to change another parameter. For example, when scanning through a list of energies, the user may give a corresponding depth increment for each energy value. + +Copyright 2009-2013 (C) by Zaher Salman. +Last modified 29 Jan. 2013 + "; + my $HelpWindow = Qt::MessageBox::information( this, "TrimSP GUI Help Window",$HelpText); +} + +# Subroutine: About window contents +sub helpAboutAction() +{ + my $HelpText="TrimSPGUI is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +TrimSPGUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with TrimSPGUI. If not, see . + +Copyright 2009-2013 by Zaher Salman. + +"; + my $HelpWindow = Qt::MessageBox::about( this, "About TrimSP GUI",$HelpText); +} + +# Subroutine: keep for tests and debugging +sub test() +{ + my $att = child("Qt::LineEdit","z0"); + my $test2= $att->text(); + my $test=this->{ui}->numberProj->text(); + print "numberProj=$test and z0=$test2\n"; +} + +1; diff --git a/trimsp/TrimSPGUI4/TrimSPGUI4.ui b/trimsp/TrimSPGUI4/TrimSPGUI4.ui new file mode 100644 index 0000000..072f346 --- /dev/null +++ b/trimsp/TrimSPGUI4/TrimSPGUI4.ui @@ -0,0 +1,2358 @@ + + + TrimSPGUI4 + + + + 0 + 0 + 722 + 622 + + + + + 0 + 0 + + + + TrimSP GUI + + + + icon.pngicon.png + + + + + + + 0 + + + + + + + 0 + + + + Layers + + + + + 10 + 10 + 431 + 511 + + + + Layers + + + + + 5 + 20 + 421 + 481 + + + + + 3 + + + 10 + + + + + + + Number of Layers + + + false + + + + + + + 1 + + + 7 + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 251 + 20 + + + + + + + + + + + + + 0 + 0 + + + + Chemical formula + + + Composition + + + false + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 101 + 20 + + + + + + + + + 0 + 0 + + + + Density [g/cm<sup>3</sup>] + + + false + + + + + + + Thickness [Å] + + + false + + + + + + + + + Layer 1 + + + + + 10 + 20 + 180 + 25 + + + + Chemical formula of L1 + + + SrTiO3 + + + + + + 200 + 20 + 111 + 25 + + + + 5.12 + + + + + + 320 + 20 + 85 + 25 + + + + + 0 + 0 + + + + 200 + + + + + + + + false + + + Layer 2 + + + + + 10 + 20 + 180 + 25 + + + + + + + 200 + 20 + 111 + 25 + + + + + + + 320 + 20 + 85 + 25 + + + + + 0 + 0 + + + + + + + + + false + + + Layer 3 + + + + + 10 + 20 + 180 + 25 + + + + + + + 200 + 20 + 111 + 25 + + + + + + + 320 + 20 + 85 + 25 + + + + + 0 + 0 + + + + + + + + + false + + + Layer 4 + + + + + 10 + 20 + 180 + 25 + + + + + + + 200 + 20 + 111 + 25 + + + + + + + 320 + 20 + 85 + 25 + + + + + 0 + 0 + + + + + + + + + false + + + Layer 5 + + + + + 10 + 20 + 180 + 25 + + + + + + + 200 + 20 + 111 + 25 + + + + + + + 320 + 20 + 85 + 25 + + + + + 0 + 0 + + + + + + + + + false + + + Layer 6 + + + + + 10 + 20 + 180 + 25 + + + + + + + 200 + 20 + 111 + 25 + + + + + + + 320 + 20 + 85 + 25 + + + + + 0 + 0 + + + + + + + + + false + + + Layer 7 + + + + + 10 + 20 + 180 + 25 + + + + + + + 200 + 20 + 111 + 25 + + + + + + + 320 + 20 + 85 + 25 + + + + + 0 + 0 + + + + + + + + + + + + 450 + 10 + 240 + 241 + + + + + 0 + 0 + + + + Projectile parameters + + + + + 11 + 68 + 113 + 16 + + + + Starting depth [Å] + + + false + + + + + + 11 + 45 + 134 + 16 + + + + + 0 + 0 + + + + Number of projectiles + + + false + + + + + + 151 + 21 + 80 + 20 + + + + + 0 + 0 + + + + + Muon + + + + + Li8 + + + + + B12 + + + + + H + + + + + + + 151 + 92 + 80 + 20 + + + + + 0 + 0 + + + + 10.0 + + + + + + 11 + 115 + 73 + 16 + + + + Energy [eV] + + + false + + + + + + 151 + 45 + 80 + 20 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + + + + + + + Qt::ImhDigitsOnly|Qt::ImhPreferNumbers + + + 10000 + + + + + + 11 + 21 + 58 + 16 + + + + Projectile + + + false + + + + + + 151 + 162 + 80 + 21 + + + + + 0 + 0 + + + + 0 + + + + + + 11 + 186 + 114 + 16 + + + + Angle sigma [deg] + + + false + + + + + + 151 + 186 + 80 + 20 + + + + + 0 + 0 + + + + 15 + + + + + + 11 + 209 + 86 + 16 + + + + Random seed + + + false + + + + + + 151 + 139 + 80 + 20 + + + + + 0 + 0 + + + + 450 + + + + + + 151 + 68 + 80 + 21 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + 0.0 + + + + + + 151 + 115 + 80 + 21 + + + + + 0 + 0 + + + + 2000 + + + + + + 151 + 209 + 80 + 21 + + + + + 0 + 0 + + + + 78741 + + + + + + 11 + 162 + 73 + 16 + + + + Angle [deg] + + + false + + + + + + 11 + 139 + 114 + 16 + + + + Energy sigma [eV] + + + false + + + + + + 11 + 92 + 127 + 16 + + + + Depth increment [Å] + + + false + + + + + + + 450 + 260 + 240 + 261 + + + + File Names + + + + + 10 + 20 + 221 + 100 + + + + + 0 + + + 0 + + + + + File names prefix + + + false + + + + + + + SrTiO3 + + + + + + + Save in subdirectory + + + false + + + + + + + + + ./ + + + + + + + + 0 + 0 + + + + Browse + + + + + + + + + + + 10 + 220 + 221 + 24 + + + + + 0 + 0 + + + + Qt::Horizontal + + + + + 0 + 25 + + + + Start + + + Start + + + + + + 0 + 25 + + + + Quit + + + Quit + + + + + + + + Additional Parameters + + + + + 10 + 10 + 251 + 211 + + + + Additional parameters + + + + false + + + + 10 + 170 + 63 + 25 + + + + + + + false + + + + + + 10 + 21 + 63 + 25 + + + + EF + + + false + + + + + + 183 + 45 + 52 + 26 + + + + 0 + + + 4 + + + 2 + + + + + + 75 + 147 + 52 + 25 + + + + + 0 + 0 + + + + 1.0 + + + + + + 129 + 172 + 53 + 25 + + + + IRL + + + false + + + + + + 183 + 20 + 52 + 26 + + + + 0 + + + 4 + + + 2 + + + + + + 129 + 20 + 53 + 25 + + + + KK0 + + + false + + + + + + 10 + 122 + 63 + 25 + + + + RD + + + false + + + + + + 184 + 171 + 52 + 26 + + + + 1 + + + + + + 129 + 147 + 53 + 25 + + + + IPOTR + + + false + + + + + + 183 + 145 + 52 + 26 + + + + 1 + + + 3 + + + + + + 10 + 46 + 63 + 25 + + + + ESB + + + false + + + + + + 75 + 122 + 52 + 25 + + + + + 0 + 0 + + + + 50.0 + + + + + + 10 + 147 + 63 + 25 + + + + CA + + + false + + + + + + 75 + 46 + 52 + 25 + + + + + 0 + 0 + + + + 0.0 + + + + + + 10 + 71 + 63 + 25 + + + + SHEATH + + + false + + + + + + 129 + 96 + 53 + 25 + + + + KDEE2 + + + false + + + + + + 129 + 71 + 53 + 25 + + + + KDEE1 + + + false + + + + + + 75 + 21 + 52 + 25 + + + + + 0 + 0 + + + + 0.5 + + + + + false + + + + 75 + 170 + 52 + 25 + + + + + 0 + 0 + + + + + + + + + + 183 + 95 + 52 + 26 + + + + 1 + + + 3 + + + 3 + + + + + + 75 + 96 + 52 + 26 + + + + + 0 + 0 + + + + 0.0 + + + + + + 129 + 46 + 53 + 25 + + + + KK0R + + + false + + + + + + 129 + 121 + 53 + 26 + + + + IPOT + + + false + + + + + + 183 + 120 + 52 + 26 + + + + 1 + + + 3 + + + 2 + + + + + + 10 + 96 + 63 + 26 + + + + ERC + + + false + + + + + + 75 + 71 + 52 + 25 + + + + + 0 + 0 + + + + 0.0 + + + + + + 183 + 70 + 52 + 26 + + + + 1 + + + 5 + + + 4 + + + + + + + Scans (Disbaled) + + + + + 10 + 10 + 421 + 221 + + + + Scan sequence + + + true + + + false + + + + + 10 + 20 + 401 + 191 + + + + + + + + + Scan + + + + + + + + 0 + 0 + + + + + Energy + + + + + Energy Sigma + + + + + Angle + + + + + Angle Sigma + + + + + Number of Projectiles + + + + + Thickness of layer + + + + + + + + false + + + 1 + + + 7 + + + + + + + + + List of values + + + listGroup + + + + + + + 1000,6000,10000 + + + + + + + Corresponding depth increment (optional) + + + false + + + + + + + false + + + + + + + + + + Loop + + + true + + + listGroup + + + + + + + 0 + + + 0 + + + + + From + + + false + + + + + + + + 0 + 0 + + + + 1000 + + + + + + + To + + + false + + + + + + + + 0 + 0 + + + + 28000 + + + + + + + Step + + + false + + + + + + + + 0 + 0 + + + + 1000 + + + + + + + + + + + + + + + + + 0 + 0 + 722 + 19 + + + + + &File + + + + + + + + + + + + + &Plot + + + + + + + &Help + + + + + + + + + + + &Save + + + Save + + + Ctrl+S + + + true + + + + + Save &As... + + + Save As + + + + + + + + &Change Folder + + + Change Folder + + + Ctrl+C + + + + + &Quit + + + Quit + + + Ctrl+Q + + + + + + ../../.designer/backup/PlotProfiles.png../../.designer/backup/PlotProfiles.png + + + &Plot Profiles + + + &Plot Profiles + + + Ctrl+P, Ctrl+R + + + + + + ../../.designer/backup/image13../../.designer/backup/image13 + + + &Contents... + + + Contents + + + + + + + + + ../../.designer/backup/image0../../.designer/backup/image0 + + + &About + + + About + + + + + + + + false + + + false + + + true + + + + ../../.designer/backup/PlotFraction.png../../.designer/backup/PlotFraction.png + + + Plot Fractions + + + Plot Fractions + + + Ctrl+P, Ctrl+F + + + + + Start + + + &Start + + + Alt+S + + + + + &Open... + + + Open + + + Ctrl+O + + + + + + tabs + numLayer + layer1Comp + layer1rho + layer1d + layer2Comp + layer2rho + layer2d + layer3Comp + layer3rho + layer3d + layer4Comp + layer4rho + layer4d + layer5Comp + layer5rho + layer5d + layer6Comp + layer6rho + layer6d + layer7Comp + layer7rho + layer7d + projComboBox + numberProj + z0 + dz + valEnergy + sigEnergy + valAngle + sigAngle + ranSeed + fileNamePrefix + workPath + Browse + Start + Quit + parEF + parESB + parSHEATH + parERC + parRD + parCA + lineEditEmpty + parKK0 + parKK0R + parKDEE1 + parKDEE2 + parIPOT + parIPOTR + parIRL + scanSeq + radioList + scanList + scanListdz + radioLoop + scanFrom + scanTo + scanStep + + + + + Start + clicked() + TrimSPGUI4 + CollectValues() + + + 490 + 552 + + + 20 + 20 + + + + + numLayer + valueChanged(int) + TrimSPGUI4 + PrepLayers() + + + 193 + 114 + + + 20 + 20 + + + + + Browse + clicked() + TrimSPGUI4 + DirectoryBrowse() + + + 689 + 427 + + + 20 + 20 + + + + + Quit + clicked() + TrimSPGUI4 + ConfirmQuit() + + + 594 + 550 + + + 20 + 20 + + + + + fileSaveAction + activated() + TrimSPGUI4 + SaveFile() + + + -1 + -1 + + + 367 + 317 + + + + + fileQuitAction + activated() + TrimSPGUI4 + close() + + + -1 + -1 + + + 367 + 317 + + + + + fileSaveAsAction + activated() + TrimSPGUI4 + SaveFileAs() + + + -1 + -1 + + + 367 + 317 + + + + + fileChangeDirAction + activated() + TrimSPGUI4 + DirectoryBrowse() + + + -1 + -1 + + + 367 + 317 + + + + + plotFractionsAction + activated() + TrimSPGUI4 + PlotFraction() + + + -1 + -1 + + + 367 + 317 + + + + + plotProfilesAction + activated() + TrimSPGUI4 + PlotProfiles() + + + -1 + -1 + + + 367 + 317 + + + + + Start + clicked() + TrimSPGUI4 + StartSequenceOne() + + + 547 + 542 + + + 721 + 568 + + + + + fileOpenAction + activated() + TrimSPGUI4 + OpenFile() + + + -1 + -1 + + + 367 + 317 + + + + + helpAboutAction + activated() + TrimSPGUI4 + helpAboutAction() + + + -1 + -1 + + + 367 + 317 + + + + + helpContentsAction + activated() + TrimSPGUI4 + helpContentsAction() + + + -1 + -1 + + + 367 + 317 + + + + + numberProj + editingFinished() + TrimSPGUI4 + test() + + + 670 + 110 + + + 721 + 129 + + + + + scanSeq + toggled(bool) + TrimSPGUI4 + ToggleScanSingle() + + + 313 + 71 + + + 721 + 323 + + + + + comboScan + currentIndexChanged(int) + TrimSPGUI4 + ToggleScanSingle() + + + 236 + 91 + + + 720 + 509 + + + + + radioList + toggled(bool) + TrimSPGUI4 + ToggleScanSingle() + + + 93 + 124 + + + 720 + 540 + + + + + radioLoop + toggled(bool) + TrimSPGUI4 + ToggleScanSingle() + + + 53 + 228 + + + 720 + 462 + + + + + scandL + valueChanged(int) + TrimSPGUI4 + ToggleScanSingle() + + + 378 + 94 + + + 717 + 237 + + + + + projComboBox + currentIndexChanged(int) + TrimSPGUI4 + ProjSmartDefaults() + + + 645 + 89 + + + 715 + 230 + + + + + + DirectoryBrowse() + StartSequenceOne() + ToggleScanSingle() + PrepLayers() + ProjSmartDefaults() + helpContentsAction() + CollectValues() + CreateInpFile() + ConfirmQuit() + PlotProfiles() + PlotFraction() + helpAboutAction() + OpenFile() + SaveFile() + SaveFileAs() + test() + + + + + diff --git a/trimsp/TrimSPGUI4/Ui_TrimSPGUI4.pm b/trimsp/TrimSPGUI4/Ui_TrimSPGUI4.pm new file mode 100644 index 0000000..aaef1a3 --- /dev/null +++ b/trimsp/TrimSPGUI4/Ui_TrimSPGUI4.pm @@ -0,0 +1,1672 @@ +############################################################################### +# +############################################################################### + +################################################################################# +## Form generated from reading UI file 'TrimSPGUI4.ui' +## +## Created: Wed Jan 30 17:16:55 2013 +## by: Qt User Interface Compiler version 4.8.4 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +package Ui_TrimSPGUI4; + +use strict; +use warnings; +use QtCore4; +use QtGui4; + +sub fileSaveAction { + return shift->{fileSaveAction}; +} + +sub fileSaveAsAction { + return shift->{fileSaveAsAction}; +} + +sub fileChangeDirAction { + return shift->{fileChangeDirAction}; +} + +sub fileQuitAction { + return shift->{fileQuitAction}; +} + +sub plotProfilesAction { + return shift->{plotProfilesAction}; +} + +sub helpContentsAction { + return shift->{helpContentsAction}; +} + +sub helpAboutAction { + return shift->{helpAboutAction}; +} + +sub plotFractionsAction { + return shift->{plotFractionsAction}; +} + +sub fileStartAction { + return shift->{fileStartAction}; +} + +sub fileOpenAction { + return shift->{fileOpenAction}; +} + +sub widget { + return shift->{widget}; +} + +sub gridLayout { + return shift->{gridLayout}; +} + +sub progress { + return shift->{progress}; +} + +sub tabs { + return shift->{tabs}; +} + +sub layersTab { + return shift->{layersTab}; +} + +sub groupBox1 { + return shift->{groupBox1}; +} + +sub layout27 { + return shift->{layout27}; +} + +sub vboxLayout { + return shift->{vboxLayout}; +} + +sub hboxLayout { + return shift->{hboxLayout}; +} + +sub textLabel1_4 { + return shift->{textLabel1_4}; +} + +sub numLayer { + return shift->{numLayer}; +} + +sub spacer2 { + return shift->{spacer2}; +} + +sub hboxLayout1 { + return shift->{hboxLayout1}; +} + +sub textLabel2_4 { + return shift->{textLabel2_4}; +} + +sub spacer1 { + return shift->{spacer1}; +} + +sub textLabel3 { + return shift->{textLabel3}; +} + +sub textLabel4 { + return shift->{textLabel4}; +} + +sub boxL1 { + return shift->{boxL1}; +} + +sub layer1Comp { + return shift->{layer1Comp}; +} + +sub layer1rho { + return shift->{layer1rho}; +} + +sub layer1d { + return shift->{layer1d}; +} + +sub boxL2 { + return shift->{boxL2}; +} + +sub layer2Comp { + return shift->{layer2Comp}; +} + +sub layer2rho { + return shift->{layer2rho}; +} + +sub layer2d { + return shift->{layer2d}; +} + +sub boxL3 { + return shift->{boxL3}; +} + +sub layer3Comp { + return shift->{layer3Comp}; +} + +sub layer3rho { + return shift->{layer3rho}; +} + +sub layer3d { + return shift->{layer3d}; +} + +sub boxL4 { + return shift->{boxL4}; +} + +sub layer4Comp { + return shift->{layer4Comp}; +} + +sub layer4rho { + return shift->{layer4rho}; +} + +sub layer4d { + return shift->{layer4d}; +} + +sub boxL5 { + return shift->{boxL5}; +} + +sub layer5Comp { + return shift->{layer5Comp}; +} + +sub layer5rho { + return shift->{layer5rho}; +} + +sub layer5d { + return shift->{layer5d}; +} + +sub boxL6 { + return shift->{boxL6}; +} + +sub layer6Comp { + return shift->{layer6Comp}; +} + +sub layer6rho { + return shift->{layer6rho}; +} + +sub layer6d { + return shift->{layer6d}; +} + +sub boxL7 { + return shift->{boxL7}; +} + +sub layer7Comp { + return shift->{layer7Comp}; +} + +sub layer7rho { + return shift->{layer7rho}; +} + +sub layer7d { + return shift->{layer7d}; +} + +sub projParam { + return shift->{projParam}; +} + +sub z0Label { + return shift->{z0Label}; +} + +sub numberLabel { + return shift->{numberLabel}; +} + +sub projComboBox { + return shift->{projComboBox}; +} + +sub dz { + return shift->{dz}; +} + +sub energyLabel { + return shift->{energyLabel}; +} + +sub numberProj { + return shift->{numberProj}; +} + +sub textLabel1 { + return shift->{textLabel1}; +} + +sub valAngle { + return shift->{valAngle}; +} + +sub sigAngleLabel { + return shift->{sigAngleLabel}; +} + +sub sigAngle { + return shift->{sigAngle}; +} + +sub seedLabel { + return shift->{seedLabel}; +} + +sub sigEnergy { + return shift->{sigEnergy}; +} + +sub z0 { + return shift->{z0}; +} + +sub valEnergy { + return shift->{valEnergy}; +} + +sub ranSeed { + return shift->{ranSeed}; +} + +sub albleLabel { + return shift->{albleLabel}; +} + +sub sigELabel { + return shift->{sigELabel}; +} + +sub dzLabel { + return shift->{dzLabel}; +} + +sub groupBox15 { + return shift->{groupBox15}; +} + +sub layout14 { + return shift->{layout14}; +} + +sub vboxLayout1 { + return shift->{vboxLayout1}; +} + +sub textLabelFN { + return shift->{textLabelFN}; +} + +sub fileNamePrefix { + return shift->{fileNamePrefix}; +} + +sub textLabelPath { + return shift->{textLabelPath}; +} + +sub hboxLayout2 { + return shift->{hboxLayout2}; +} + +sub workPath { + return shift->{workPath}; +} + +sub browse { + return shift->{browse}; +} + +sub splitter { + return shift->{splitter}; +} + +sub start { + return shift->{start}; +} + +sub quit { + return shift->{quit}; +} + +sub addParTab { + return shift->{addParTab}; +} + +sub addParam { + return shift->{addParam}; +} + +sub textLabelEmpty { + return shift->{textLabelEmpty}; +} + +sub textLabelEF { + return shift->{textLabelEF}; +} + +sub parKK0R { + return shift->{parKK0R}; +} + +sub parCA { + return shift->{parCA}; +} + +sub textLabelIRL { + return shift->{textLabelIRL}; +} + +sub parKK0 { + return shift->{parKK0}; +} + +sub textLabelKK0 { + return shift->{textLabelKK0}; +} + +sub textLabelRD { + return shift->{textLabelRD}; +} + +sub parIRL { + return shift->{parIRL}; +} + +sub textLabelIPOTR { + return shift->{textLabelIPOTR}; +} + +sub parIPOTR { + return shift->{parIPOTR}; +} + +sub textLabelESB { + return shift->{textLabelESB}; +} + +sub parRD { + return shift->{parRD}; +} + +sub textLabelCA { + return shift->{textLabelCA}; +} + +sub parESB { + return shift->{parESB}; +} + +sub textLabelSHEATH { + return shift->{textLabelSHEATH}; +} + +sub textLabelKDEE2 { + return shift->{textLabelKDEE2}; +} + +sub textLabelKDEE1 { + return shift->{textLabelKDEE1}; +} + +sub parEF { + return shift->{parEF}; +} + +sub lineEditEmpty { + return shift->{lineEditEmpty}; +} + +sub parKDEE2 { + return shift->{parKDEE2}; +} + +sub parERC { + return shift->{parERC}; +} + +sub textLabelKK0R { + return shift->{textLabelKK0R}; +} + +sub textLabelIPOT { + return shift->{textLabelIPOT}; +} + +sub parIPOT { + return shift->{parIPOT}; +} + +sub textLabelERC { + return shift->{textLabelERC}; +} + +sub parSHEATH { + return shift->{parSHEATH}; +} + +sub parKDEE1 { + return shift->{parKDEE1}; +} + +sub scansTab { + return shift->{scansTab}; +} + +sub scanSeq { + return shift->{scanSeq}; +} + +sub layoutWidget { + return shift->{layoutWidget}; +} + +sub verticalLayout { + return shift->{verticalLayout}; +} + +sub horizontalLayout_3 { + return shift->{horizontalLayout_3}; +} + +sub label { + return shift->{label}; +} + +sub comboScan { + return shift->{comboScan}; +} + +sub scandL { + return shift->{scandL}; +} + +sub radioList { + return shift->{radioList}; +} + +sub scanList { + return shift->{scanList}; +} + +sub dzListLabel { + return shift->{dzListLabel}; +} + +sub scanListdz { + return shift->{scanListdz}; +} + +sub radioLoop { + return shift->{radioLoop}; +} + +sub scanLoop { + return shift->{scanLoop}; +} + +sub textLabel2 { + return shift->{textLabel2}; +} + +sub scanFrom { + return shift->{scanFrom}; +} + +sub textLabel2_2 { + return shift->{textLabel2_2}; +} + +sub scanTo { + return shift->{scanTo}; +} + +sub textLabel2_2_2_2 { + return shift->{textLabel2_2_2_2}; +} + +sub scanStep { + return shift->{scanStep}; +} + +sub menuBar { + return shift->{menuBar}; +} + +sub file { + return shift->{file}; +} + +sub plot { + return shift->{plot}; +} + +sub helpMenu { + return shift->{helpMenu}; +} + + +sub setupUi { + my ( $class, $trimSPGUI4 ) = @_; + my $self = bless {}, $class; + if ( !defined $trimSPGUI4->objectName() ) { + $trimSPGUI4->setObjectName( "trimSPGUI4" ); + } + $trimSPGUI4->resize( 722, 622 ); + my $sizePolicy = Qt::SizePolicy( Qt::SizePolicy::Fixed(), Qt::SizePolicy::Fixed() ); + $self->{$sizePolicy} = $sizePolicy; + $sizePolicy->setHorizontalStretch( 0 ); + $sizePolicy->setVerticalStretch( 0 ); + $sizePolicy->setHeightForWidth( $trimSPGUI4->sizePolicy()->hasHeightForWidth() ); + $trimSPGUI4->setSizePolicy( $sizePolicy ); + my $icon = Qt::Icon(); + $icon->addPixmap(Qt::Pixmap("icon.png"), Qt::Icon::Normal(), Qt::Icon::Off() ); + $trimSPGUI4->setWindowIcon( $icon ); + my $fileSaveAction = Qt::Action($trimSPGUI4); + $self->{fileSaveAction} = $fileSaveAction; + $fileSaveAction->setObjectName( "fileSaveAction" ); + $fileSaveAction->setIconVisibleInMenu( 1 ); + my $fileSaveAsAction = Qt::Action($trimSPGUI4); + $self->{fileSaveAsAction} = $fileSaveAsAction; + $fileSaveAsAction->setObjectName( "fileSaveAsAction" ); + my $fileChangeDirAction = Qt::Action($trimSPGUI4); + $self->{fileChangeDirAction} = $fileChangeDirAction; + $fileChangeDirAction->setObjectName( "fileChangeDirAction" ); + my $fileQuitAction = Qt::Action($trimSPGUI4); + $self->{fileQuitAction} = $fileQuitAction; + $fileQuitAction->setObjectName( "fileQuitAction" ); + my $plotProfilesAction = Qt::Action($trimSPGUI4); + $self->{plotProfilesAction} = $plotProfilesAction; + $plotProfilesAction->setObjectName( "plotProfilesAction" ); + my $icon1 = Qt::Icon(); + $icon1->addPixmap(Qt::Pixmap("../../.designer/backup/PlotProfiles.png"), Qt::Icon::Normal(), Qt::Icon::Off() ); + $plotProfilesAction->setIcon( $icon1 ); + my $helpContentsAction = Qt::Action($trimSPGUI4); + $self->{helpContentsAction} = $helpContentsAction; + $helpContentsAction->setObjectName( "helpContentsAction" ); + my $icon2 = Qt::Icon(); + $icon2->addPixmap(Qt::Pixmap("../../.designer/backup/image13"), Qt::Icon::Normal(), Qt::Icon::Off() ); + $helpContentsAction->setIcon( $icon2 ); + my $helpAboutAction = Qt::Action($trimSPGUI4); + $self->{helpAboutAction} = $helpAboutAction; + $helpAboutAction->setObjectName( "helpAboutAction" ); + my $icon3 = Qt::Icon(); + $icon3->addPixmap(Qt::Pixmap("../../.designer/backup/image0"), Qt::Icon::Normal(), Qt::Icon::Off() ); + $helpAboutAction->setIcon( $icon3 ); + my $plotFractionsAction = Qt::Action($trimSPGUI4); + $self->{plotFractionsAction} = $plotFractionsAction; + $plotFractionsAction->setObjectName( "plotFractionsAction" ); + $plotFractionsAction->setCheckable( 0 ); + $plotFractionsAction->setChecked( 0 ); + $plotFractionsAction->setEnabled( 1 ); + my $icon4 = Qt::Icon(); + $icon4->addPixmap(Qt::Pixmap("../../.designer/backup/PlotFraction.png"), Qt::Icon::Normal(), Qt::Icon::Off() ); + $plotFractionsAction->setIcon( $icon4 ); + my $fileStartAction = Qt::Action($trimSPGUI4); + $self->{fileStartAction} = $fileStartAction; + $fileStartAction->setObjectName( "fileStartAction" ); + my $fileOpenAction = Qt::Action($trimSPGUI4); + $self->{fileOpenAction} = $fileOpenAction; + $fileOpenAction->setObjectName( "fileOpenAction" ); + my $widget = Qt::Widget( $trimSPGUI4 ); + $self->{widget} = $widget; + $widget->setObjectName( "widget" ); + my $gridLayout = Qt::GridLayout( $widget ); + $self->{gridLayout} = $gridLayout; + $gridLayout->setSpacing( 6 ); + $gridLayout->setMargin( 11 ); + $gridLayout->setObjectName( "gridLayout" ); + my $progress = Qt::ProgressBar( $widget ); + $self->{progress} = $progress; + $progress->setObjectName( "progress" ); + $progress->setValue( 0 ); + + $gridLayout->addWidget( $progress, 1, 0, 1, 1 ); + + my $tabs = Qt::TabWidget( $widget ); + $self->{tabs} = $tabs; + $tabs->setObjectName( "tabs" ); + my $layersTab = Qt::Widget( ); + $self->{layersTab} = $layersTab; + $layersTab->setObjectName( "layersTab" ); + my $groupBox1 = Qt::GroupBox( $layersTab ); + $self->{groupBox1} = $groupBox1; + $groupBox1->setObjectName( "groupBox1" ); + $groupBox1->setGeometry( Qt::Rect(10, 10, 431, 511) ); + my $layout27 = Qt::Widget( $groupBox1 ); + $self->{layout27} = $layout27; + $layout27->setObjectName( "layout27" ); + $layout27->setGeometry( Qt::Rect(5, 20, 421, 481) ); + my $vboxLayout = Qt::VBoxLayout( $layout27 ); + $self->{vboxLayout} = $vboxLayout; + $vboxLayout->setSpacing( 3 ); + $vboxLayout->setMargin( 11 ); + $vboxLayout->setObjectName( "vboxLayout" ); + $vboxLayout->setContentsMargins(0, 0, 0, 10 ); + my $hboxLayout = Qt::HBoxLayout( ); + $self->{hboxLayout} = $hboxLayout; + $hboxLayout->setSpacing( 6 ); + $hboxLayout->setObjectName( "hboxLayout" ); + my $textLabel1_4 = Qt::Label( $layout27 ); + $self->{textLabel1_4} = $textLabel1_4; + $textLabel1_4->setObjectName( "textLabel1_4" ); + $textLabel1_4->setWordWrap( 0 ); + + $hboxLayout->addWidget( $textLabel1_4 ); + + my $numLayer = Qt::SpinBox( $layout27 ); + $self->{numLayer} = $numLayer; + $numLayer->setObjectName( "numLayer" ); + $numLayer->setMinimum( 1 ); + $numLayer->setMaximum( 7 ); + + $hboxLayout->addWidget( $numLayer ); + + my $spacer2 = Qt::SpacerItem( 251, 20, Qt::SizePolicy::Expanding(), Qt::SizePolicy::Minimum() ); + + $hboxLayout->addItem( $spacer2 ); + + + $vboxLayout->addLayout( $hboxLayout ); + + my $hboxLayout1 = Qt::HBoxLayout( ); + $self->{hboxLayout1} = $hboxLayout1; + $hboxLayout1->setSpacing( 6 ); + $hboxLayout1->setObjectName( "hboxLayout1" ); + my $textLabel2_4 = Qt::Label( $layout27 ); + $self->{textLabel2_4} = $textLabel2_4; + $textLabel2_4->setObjectName( "textLabel2_4" ); + my $sizePolicy1 = Qt::SizePolicy( Qt::SizePolicy::Fixed(), Qt::SizePolicy::Minimum() ); + $self->{$sizePolicy1} = $sizePolicy1; + $sizePolicy1->setHorizontalStretch( 0 ); + $sizePolicy1->setVerticalStretch( 0 ); + $sizePolicy1->setHeightForWidth( $textLabel2_4->sizePolicy()->hasHeightForWidth() ); + $textLabel2_4->setSizePolicy( $sizePolicy1 ); + $textLabel2_4->setWordWrap( 0 ); + + $hboxLayout1->addWidget( $textLabel2_4 ); + + my $spacer1 = Qt::SpacerItem( 101, 20, Qt::SizePolicy::Fixed(), Qt::SizePolicy::Minimum() ); + + $hboxLayout1->addItem( $spacer1 ); + + my $textLabel3 = Qt::Label( $layout27 ); + $self->{textLabel3} = $textLabel3; + $textLabel3->setObjectName( "textLabel3" ); + my $sizePolicy2 = Qt::SizePolicy( Qt::SizePolicy::Minimum(), Qt::SizePolicy::Preferred() ); + $self->{$sizePolicy2} = $sizePolicy2; + $sizePolicy2->setHorizontalStretch( 0 ); + $sizePolicy2->setVerticalStretch( 0 ); + $sizePolicy2->setHeightForWidth( $textLabel3->sizePolicy()->hasHeightForWidth() ); + $textLabel3->setSizePolicy( $sizePolicy2 ); + $textLabel3->setWordWrap( 0 ); + + $hboxLayout1->addWidget( $textLabel3 ); + + my $textLabel4 = Qt::Label( $layout27 ); + $self->{textLabel4} = $textLabel4; + $textLabel4->setObjectName( "textLabel4" ); + $textLabel4->setWordWrap( 0 ); + + $hboxLayout1->addWidget( $textLabel4 ); + + + $vboxLayout->addLayout( $hboxLayout1 ); + + my $boxL1 = Qt::GroupBox( $layout27 ); + $self->{boxL1} = $boxL1; + $boxL1->setObjectName( "boxL1" ); + my $layer1Comp = Qt::LineEdit( $boxL1 ); + $self->{layer1Comp} = $layer1Comp; + $layer1Comp->setObjectName( "layer1Comp" ); + $layer1Comp->setGeometry( Qt::Rect(10, 20, 180, 25) ); + my $layer1rho = Qt::LineEdit( $boxL1 ); + $self->{layer1rho} = $layer1rho; + $layer1rho->setObjectName( "layer1rho" ); + $layer1rho->setGeometry( Qt::Rect(200, 20, 111, 25) ); + my $layer1d = Qt::LineEdit( $boxL1 ); + $self->{layer1d} = $layer1d; + $layer1d->setObjectName( "layer1d" ); + $layer1d->setGeometry( Qt::Rect(320, 20, 85, 25) ); + $sizePolicy->setHeightForWidth( $layer1d->sizePolicy()->hasHeightForWidth() ); + $layer1d->setSizePolicy( $sizePolicy ); + + $vboxLayout->addWidget( $boxL1 ); + + my $boxL2 = Qt::GroupBox( $layout27 ); + $self->{boxL2} = $boxL2; + $boxL2->setObjectName( "boxL2" ); + $boxL2->setEnabled( 0 ); + my $layer2Comp = Qt::LineEdit( $boxL2 ); + $self->{layer2Comp} = $layer2Comp; + $layer2Comp->setObjectName( "layer2Comp" ); + $layer2Comp->setGeometry( Qt::Rect(10, 20, 180, 25) ); + my $layer2rho = Qt::LineEdit( $boxL2 ); + $self->{layer2rho} = $layer2rho; + $layer2rho->setObjectName( "layer2rho" ); + $layer2rho->setGeometry( Qt::Rect(200, 20, 111, 25) ); + my $layer2d = Qt::LineEdit( $boxL2 ); + $self->{layer2d} = $layer2d; + $layer2d->setObjectName( "layer2d" ); + $layer2d->setGeometry( Qt::Rect(320, 20, 85, 25) ); + $sizePolicy->setHeightForWidth( $layer2d->sizePolicy()->hasHeightForWidth() ); + $layer2d->setSizePolicy( $sizePolicy ); + + $vboxLayout->addWidget( $boxL2 ); + + my $boxL3 = Qt::GroupBox( $layout27 ); + $self->{boxL3} = $boxL3; + $boxL3->setObjectName( "boxL3" ); + $boxL3->setEnabled( 0 ); + my $layer3Comp = Qt::LineEdit( $boxL3 ); + $self->{layer3Comp} = $layer3Comp; + $layer3Comp->setObjectName( "layer3Comp" ); + $layer3Comp->setGeometry( Qt::Rect(10, 20, 180, 25) ); + my $layer3rho = Qt::LineEdit( $boxL3 ); + $self->{layer3rho} = $layer3rho; + $layer3rho->setObjectName( "layer3rho" ); + $layer3rho->setGeometry( Qt::Rect(200, 20, 111, 25) ); + my $layer3d = Qt::LineEdit( $boxL3 ); + $self->{layer3d} = $layer3d; + $layer3d->setObjectName( "layer3d" ); + $layer3d->setGeometry( Qt::Rect(320, 20, 85, 25) ); + $sizePolicy->setHeightForWidth( $layer3d->sizePolicy()->hasHeightForWidth() ); + $layer3d->setSizePolicy( $sizePolicy ); + + $vboxLayout->addWidget( $boxL3 ); + + my $boxL4 = Qt::GroupBox( $layout27 ); + $self->{boxL4} = $boxL4; + $boxL4->setObjectName( "boxL4" ); + $boxL4->setEnabled( 0 ); + my $layer4Comp = Qt::LineEdit( $boxL4 ); + $self->{layer4Comp} = $layer4Comp; + $layer4Comp->setObjectName( "layer4Comp" ); + $layer4Comp->setGeometry( Qt::Rect(10, 20, 180, 25) ); + my $layer4rho = Qt::LineEdit( $boxL4 ); + $self->{layer4rho} = $layer4rho; + $layer4rho->setObjectName( "layer4rho" ); + $layer4rho->setGeometry( Qt::Rect(200, 20, 111, 25) ); + my $layer4d = Qt::LineEdit( $boxL4 ); + $self->{layer4d} = $layer4d; + $layer4d->setObjectName( "layer4d" ); + $layer4d->setGeometry( Qt::Rect(320, 20, 85, 25) ); + $sizePolicy->setHeightForWidth( $layer4d->sizePolicy()->hasHeightForWidth() ); + $layer4d->setSizePolicy( $sizePolicy ); + + $vboxLayout->addWidget( $boxL4 ); + + my $boxL5 = Qt::GroupBox( $layout27 ); + $self->{boxL5} = $boxL5; + $boxL5->setObjectName( "boxL5" ); + $boxL5->setEnabled( 0 ); + my $layer5Comp = Qt::LineEdit( $boxL5 ); + $self->{layer5Comp} = $layer5Comp; + $layer5Comp->setObjectName( "layer5Comp" ); + $layer5Comp->setGeometry( Qt::Rect(10, 20, 180, 25) ); + my $layer5rho = Qt::LineEdit( $boxL5 ); + $self->{layer5rho} = $layer5rho; + $layer5rho->setObjectName( "layer5rho" ); + $layer5rho->setGeometry( Qt::Rect(200, 20, 111, 25) ); + my $layer5d = Qt::LineEdit( $boxL5 ); + $self->{layer5d} = $layer5d; + $layer5d->setObjectName( "layer5d" ); + $layer5d->setGeometry( Qt::Rect(320, 20, 85, 25) ); + $sizePolicy->setHeightForWidth( $layer5d->sizePolicy()->hasHeightForWidth() ); + $layer5d->setSizePolicy( $sizePolicy ); + + $vboxLayout->addWidget( $boxL5 ); + + my $boxL6 = Qt::GroupBox( $layout27 ); + $self->{boxL6} = $boxL6; + $boxL6->setObjectName( "boxL6" ); + $boxL6->setEnabled( 0 ); + my $layer6Comp = Qt::LineEdit( $boxL6 ); + $self->{layer6Comp} = $layer6Comp; + $layer6Comp->setObjectName( "layer6Comp" ); + $layer6Comp->setGeometry( Qt::Rect(10, 20, 180, 25) ); + my $layer6rho = Qt::LineEdit( $boxL6 ); + $self->{layer6rho} = $layer6rho; + $layer6rho->setObjectName( "layer6rho" ); + $layer6rho->setGeometry( Qt::Rect(200, 20, 111, 25) ); + my $layer6d = Qt::LineEdit( $boxL6 ); + $self->{layer6d} = $layer6d; + $layer6d->setObjectName( "layer6d" ); + $layer6d->setGeometry( Qt::Rect(320, 20, 85, 25) ); + $sizePolicy->setHeightForWidth( $layer6d->sizePolicy()->hasHeightForWidth() ); + $layer6d->setSizePolicy( $sizePolicy ); + + $vboxLayout->addWidget( $boxL6 ); + + my $boxL7 = Qt::GroupBox( $layout27 ); + $self->{boxL7} = $boxL7; + $boxL7->setObjectName( "boxL7" ); + $boxL7->setEnabled( 0 ); + my $layer7Comp = Qt::LineEdit( $boxL7 ); + $self->{layer7Comp} = $layer7Comp; + $layer7Comp->setObjectName( "layer7Comp" ); + $layer7Comp->setGeometry( Qt::Rect(10, 20, 180, 25) ); + my $layer7rho = Qt::LineEdit( $boxL7 ); + $self->{layer7rho} = $layer7rho; + $layer7rho->setObjectName( "layer7rho" ); + $layer7rho->setGeometry( Qt::Rect(200, 20, 111, 25) ); + my $layer7d = Qt::LineEdit( $boxL7 ); + $self->{layer7d} = $layer7d; + $layer7d->setObjectName( "layer7d" ); + $layer7d->setGeometry( Qt::Rect(320, 20, 85, 25) ); + $sizePolicy->setHeightForWidth( $layer7d->sizePolicy()->hasHeightForWidth() ); + $layer7d->setSizePolicy( $sizePolicy ); + + $vboxLayout->addWidget( $boxL7 ); + + my $projParam = Qt::GroupBox( $layersTab ); + $self->{projParam} = $projParam; + $projParam->setObjectName( "projParam" ); + $projParam->setGeometry( Qt::Rect(450, 10, 240, 241) ); + $sizePolicy->setHeightForWidth( $projParam->sizePolicy()->hasHeightForWidth() ); + $projParam->setSizePolicy( $sizePolicy ); + my $z0Label = Qt::Label( $projParam ); + $self->{z0Label} = $z0Label; + $z0Label->setObjectName( "z0Label" ); + $z0Label->setGeometry( Qt::Rect(11, 68, 113, 16) ); + $z0Label->setWordWrap( 0 ); + my $numberLabel = Qt::Label( $projParam ); + $self->{numberLabel} = $numberLabel; + $numberLabel->setObjectName( "numberLabel" ); + $numberLabel->setGeometry( Qt::Rect(11, 45, 134, 16) ); + my $sizePolicy3 = Qt::SizePolicy( Qt::SizePolicy::Preferred(), Qt::SizePolicy::Preferred() ); + $self->{$sizePolicy3} = $sizePolicy3; + $sizePolicy3->setHorizontalStretch( 0 ); + $sizePolicy3->setVerticalStretch( 0 ); + $sizePolicy3->setHeightForWidth( $numberLabel->sizePolicy()->hasHeightForWidth() ); + $numberLabel->setSizePolicy( $sizePolicy3 ); + $numberLabel->setWordWrap( 0 ); + my $projComboBox = Qt::ComboBox( $projParam ); + $self->{projComboBox} = $projComboBox; + $projComboBox->setObjectName( "projComboBox" ); + $projComboBox->setGeometry( Qt::Rect(151, 21, 80, 20) ); + my $sizePolicy4 = Qt::SizePolicy( Qt::SizePolicy::Ignored(), Qt::SizePolicy::Preferred() ); + $self->{$sizePolicy4} = $sizePolicy4; + $sizePolicy4->setHorizontalStretch( 0 ); + $sizePolicy4->setVerticalStretch( 0 ); + $sizePolicy4->setHeightForWidth( $projComboBox->sizePolicy()->hasHeightForWidth() ); + $projComboBox->setSizePolicy( $sizePolicy4 ); + my $dz = Qt::LineEdit( $projParam ); + $self->{dz} = $dz; + $dz->setObjectName( "dz" ); + $dz->setGeometry( Qt::Rect(151, 92, 80, 20) ); + $sizePolicy4->setHeightForWidth( $dz->sizePolicy()->hasHeightForWidth() ); + $dz->setSizePolicy( $sizePolicy4 ); + my $energyLabel = Qt::Label( $projParam ); + $self->{energyLabel} = $energyLabel; + $energyLabel->setObjectName( "energyLabel" ); + $energyLabel->setGeometry( Qt::Rect(11, 115, 73, 16) ); + $energyLabel->setWordWrap( 0 ); + my $numberProj = Qt::LineEdit( $projParam ); + $self->{numberProj} = $numberProj; + $numberProj->setObjectName( "numberProj" ); + $numberProj->setGeometry( Qt::Rect(151, 45, 80, 20) ); + $sizePolicy4->setHeightForWidth( $numberProj->sizePolicy()->hasHeightForWidth() ); + $numberProj->setSizePolicy( $sizePolicy4 ); + $numberProj->setMaximumSize( Qt::Size(32767, 32767) ); + $numberProj->setWhatsThis( "" ); + $numberProj->setAccessibleName( "" ); + $numberProj->setInputMethodHints( Qt::ImhDigitsOnly()|Qt::ImhPreferNumbers() ); + my $textLabel1 = Qt::Label( $projParam ); + $self->{textLabel1} = $textLabel1; + $textLabel1->setObjectName( "textLabel1" ); + $textLabel1->setGeometry( Qt::Rect(11, 21, 58, 16) ); + $textLabel1->setWordWrap( 0 ); + my $valAngle = Qt::LineEdit( $projParam ); + $self->{valAngle} = $valAngle; + $valAngle->setObjectName( "valAngle" ); + $valAngle->setGeometry( Qt::Rect(151, 162, 80, 21) ); + $sizePolicy4->setHeightForWidth( $valAngle->sizePolicy()->hasHeightForWidth() ); + $valAngle->setSizePolicy( $sizePolicy4 ); + my $sigAngleLabel = Qt::Label( $projParam ); + $self->{sigAngleLabel} = $sigAngleLabel; + $sigAngleLabel->setObjectName( "sigAngleLabel" ); + $sigAngleLabel->setGeometry( Qt::Rect(11, 186, 114, 16) ); + $sigAngleLabel->setWordWrap( 0 ); + my $sigAngle = Qt::LineEdit( $projParam ); + $self->{sigAngle} = $sigAngle; + $sigAngle->setObjectName( "sigAngle" ); + $sigAngle->setGeometry( Qt::Rect(151, 186, 80, 20) ); + $sizePolicy4->setHeightForWidth( $sigAngle->sizePolicy()->hasHeightForWidth() ); + $sigAngle->setSizePolicy( $sizePolicy4 ); + my $seedLabel = Qt::Label( $projParam ); + $self->{seedLabel} = $seedLabel; + $seedLabel->setObjectName( "seedLabel" ); + $seedLabel->setGeometry( Qt::Rect(11, 209, 86, 16) ); + $seedLabel->setWordWrap( 0 ); + my $sigEnergy = Qt::LineEdit( $projParam ); + $self->{sigEnergy} = $sigEnergy; + $sigEnergy->setObjectName( "sigEnergy" ); + $sigEnergy->setGeometry( Qt::Rect(151, 139, 80, 20) ); + $sizePolicy4->setHeightForWidth( $sigEnergy->sizePolicy()->hasHeightForWidth() ); + $sigEnergy->setSizePolicy( $sizePolicy4 ); + my $z0 = Qt::LineEdit( $projParam ); + $self->{z0} = $z0; + $z0->setObjectName( "z0" ); + $z0->setGeometry( Qt::Rect(151, 68, 80, 21) ); + $sizePolicy4->setHeightForWidth( $z0->sizePolicy()->hasHeightForWidth() ); + $z0->setSizePolicy( $sizePolicy4 ); + $z0->setMaximumSize( Qt::Size(32767, 32767) ); + my $valEnergy = Qt::LineEdit( $projParam ); + $self->{valEnergy} = $valEnergy; + $valEnergy->setObjectName( "valEnergy" ); + $valEnergy->setGeometry( Qt::Rect(151, 115, 80, 21) ); + $sizePolicy4->setHeightForWidth( $valEnergy->sizePolicy()->hasHeightForWidth() ); + $valEnergy->setSizePolicy( $sizePolicy4 ); + my $ranSeed = Qt::LineEdit( $projParam ); + $self->{ranSeed} = $ranSeed; + $ranSeed->setObjectName( "ranSeed" ); + $ranSeed->setGeometry( Qt::Rect(151, 209, 80, 21) ); + $sizePolicy4->setHeightForWidth( $ranSeed->sizePolicy()->hasHeightForWidth() ); + $ranSeed->setSizePolicy( $sizePolicy4 ); + my $albleLabel = Qt::Label( $projParam ); + $self->{albleLabel} = $albleLabel; + $albleLabel->setObjectName( "albleLabel" ); + $albleLabel->setGeometry( Qt::Rect(11, 162, 73, 16) ); + $albleLabel->setWordWrap( 0 ); + my $sigELabel = Qt::Label( $projParam ); + $self->{sigELabel} = $sigELabel; + $sigELabel->setObjectName( "sigELabel" ); + $sigELabel->setGeometry( Qt::Rect(11, 139, 114, 16) ); + $sigELabel->setWordWrap( 0 ); + my $dzLabel = Qt::Label( $projParam ); + $self->{dzLabel} = $dzLabel; + $dzLabel->setObjectName( "dzLabel" ); + $dzLabel->setGeometry( Qt::Rect(11, 92, 127, 16) ); + $dzLabel->setWordWrap( 0 ); + my $groupBox15 = Qt::GroupBox( $layersTab ); + $self->{groupBox15} = $groupBox15; + $groupBox15->setObjectName( "groupBox15" ); + $groupBox15->setGeometry( Qt::Rect(450, 260, 240, 261) ); + my $layout14 = Qt::Widget( $groupBox15 ); + $self->{layout14} = $layout14; + $layout14->setObjectName( "layout14" ); + $layout14->setGeometry( Qt::Rect(10, 20, 221, 100) ); + my $vboxLayout1 = Qt::VBoxLayout( $layout14 ); + $self->{vboxLayout1} = $vboxLayout1; + $vboxLayout1->setSpacing( 0 ); + $vboxLayout1->setMargin( 0 ); + $vboxLayout1->setObjectName( "vboxLayout1" ); + $vboxLayout1->setContentsMargins(0, 0, 0, 0 ); + my $textLabelFN = Qt::Label( $layout14 ); + $self->{textLabelFN} = $textLabelFN; + $textLabelFN->setObjectName( "textLabelFN" ); + $textLabelFN->setWordWrap( 0 ); + + $vboxLayout1->addWidget( $textLabelFN ); + + my $fileNamePrefix = Qt::LineEdit( $layout14 ); + $self->{fileNamePrefix} = $fileNamePrefix; + $fileNamePrefix->setObjectName( "fileNamePrefix" ); + + $vboxLayout1->addWidget( $fileNamePrefix ); + + my $textLabelPath = Qt::Label( $layout14 ); + $self->{textLabelPath} = $textLabelPath; + $textLabelPath->setObjectName( "textLabelPath" ); + $textLabelPath->setWordWrap( 0 ); + + $vboxLayout1->addWidget( $textLabelPath ); + + my $hboxLayout2 = Qt::HBoxLayout( ); + $self->{hboxLayout2} = $hboxLayout2; + $hboxLayout2->setSpacing( 6 ); + $hboxLayout2->setObjectName( "hboxLayout2" ); + my $workPath = Qt::LineEdit( $layout14 ); + $self->{workPath} = $workPath; + $workPath->setObjectName( "workPath" ); + + $hboxLayout2->addWidget( $workPath ); + + my $browse = Qt::PushButton( $layout14 ); + $self->{browse} = $browse; + $browse->setObjectName( "browse" ); + my $sizePolicy5 = Qt::SizePolicy( Qt::SizePolicy::Expanding(), Qt::SizePolicy::Fixed() ); + $self->{$sizePolicy5} = $sizePolicy5; + $sizePolicy5->setHorizontalStretch( 0 ); + $sizePolicy5->setVerticalStretch( 0 ); + $sizePolicy5->setHeightForWidth( $browse->sizePolicy()->hasHeightForWidth() ); + $browse->setSizePolicy( $sizePolicy5 ); + + $hboxLayout2->addWidget( $browse ); + + + $vboxLayout1->addLayout( $hboxLayout2 ); + + my $splitter = Qt::Splitter( $groupBox15 ); + $self->{splitter} = $splitter; + $splitter->setObjectName( "splitter" ); + $splitter->setGeometry( Qt::Rect(10, 220, 221, 24) ); + my $sizePolicy6 = Qt::SizePolicy( Qt::SizePolicy::Preferred(), Qt::SizePolicy::Minimum() ); + $self->{$sizePolicy6} = $sizePolicy6; + $sizePolicy6->setHorizontalStretch( 0 ); + $sizePolicy6->setVerticalStretch( 0 ); + $sizePolicy6->setHeightForWidth( $splitter->sizePolicy()->hasHeightForWidth() ); + $splitter->setSizePolicy( $sizePolicy6 ); + $splitter->setOrientation( Qt::Horizontal() ); + my $start = Qt::PushButton( $splitter ); + $self->{start} = $start; + $start->setObjectName( "start" ); + $start->setMinimumSize( Qt::Size(0, 25) ); + $splitter->addWidget( $start ); + my $quit = Qt::PushButton( $splitter ); + $self->{quit} = $quit; + $quit->setObjectName( "quit" ); + $quit->setMinimumSize( Qt::Size(0, 25) ); + $splitter->addWidget( $quit ); + $tabs->addTab( $layersTab, Qt::Application::translate( 'TrimSPGUI4', "Layers", undef, Qt::Application::UnicodeUTF8() ) ); + my $addParTab = Qt::Widget( ); + $self->{addParTab} = $addParTab; + $addParTab->setObjectName( "addParTab" ); + my $addParam = Qt::GroupBox( $addParTab ); + $self->{addParam} = $addParam; + $addParam->setObjectName( "addParam" ); + $addParam->setGeometry( Qt::Rect(10, 10, 251, 211) ); + my $textLabelEmpty = Qt::Label( $addParam ); + $self->{textLabelEmpty} = $textLabelEmpty; + $textLabelEmpty->setObjectName( "textLabelEmpty" ); + $textLabelEmpty->setEnabled( 0 ); + $textLabelEmpty->setGeometry( Qt::Rect(10, 170, 63, 25) ); + $textLabelEmpty->setWordWrap( 0 ); + my $textLabelEF = Qt::Label( $addParam ); + $self->{textLabelEF} = $textLabelEF; + $textLabelEF->setObjectName( "textLabelEF" ); + $textLabelEF->setGeometry( Qt::Rect(10, 21, 63, 25) ); + $textLabelEF->setWordWrap( 0 ); + my $parKK0R = Qt::SpinBox( $addParam ); + $self->{parKK0R} = $parKK0R; + $parKK0R->setObjectName( "parKK0R" ); + $parKK0R->setGeometry( Qt::Rect(183, 45, 52, 26) ); + $parKK0R->setMinimum( 0 ); + $parKK0R->setMaximum( 4 ); + $parKK0R->setValue( 2 ); + my $parCA = Qt::LineEdit( $addParam ); + $self->{parCA} = $parCA; + $parCA->setObjectName( "parCA" ); + $parCA->setGeometry( Qt::Rect(75, 147, 52, 25) ); + my $sizePolicy7 = Qt::SizePolicy( Qt::SizePolicy::Expanding(), Qt::SizePolicy::Expanding() ); + $self->{$sizePolicy7} = $sizePolicy7; + $sizePolicy7->setHorizontalStretch( 0 ); + $sizePolicy7->setVerticalStretch( 0 ); + $sizePolicy7->setHeightForWidth( $parCA->sizePolicy()->hasHeightForWidth() ); + $parCA->setSizePolicy( $sizePolicy7 ); + my $textLabelIRL = Qt::Label( $addParam ); + $self->{textLabelIRL} = $textLabelIRL; + $textLabelIRL->setObjectName( "textLabelIRL" ); + $textLabelIRL->setGeometry( Qt::Rect(129, 172, 53, 25) ); + $textLabelIRL->setWordWrap( 0 ); + my $parKK0 = Qt::SpinBox( $addParam ); + $self->{parKK0} = $parKK0; + $parKK0->setObjectName( "parKK0" ); + $parKK0->setGeometry( Qt::Rect(183, 20, 52, 26) ); + $parKK0->setMinimum( 0 ); + $parKK0->setMaximum( 4 ); + $parKK0->setValue( 2 ); + my $textLabelKK0 = Qt::Label( $addParam ); + $self->{textLabelKK0} = $textLabelKK0; + $textLabelKK0->setObjectName( "textLabelKK0" ); + $textLabelKK0->setGeometry( Qt::Rect(129, 20, 53, 25) ); + $textLabelKK0->setWordWrap( 0 ); + my $textLabelRD = Qt::Label( $addParam ); + $self->{textLabelRD} = $textLabelRD; + $textLabelRD->setObjectName( "textLabelRD" ); + $textLabelRD->setGeometry( Qt::Rect(10, 122, 63, 25) ); + $textLabelRD->setWordWrap( 0 ); + my $parIRL = Qt::SpinBox( $addParam ); + $self->{parIRL} = $parIRL; + $parIRL->setObjectName( "parIRL" ); + $parIRL->setGeometry( Qt::Rect(184, 171, 52, 26) ); + $parIRL->setMaximum( 1 ); + my $textLabelIPOTR = Qt::Label( $addParam ); + $self->{textLabelIPOTR} = $textLabelIPOTR; + $textLabelIPOTR->setObjectName( "textLabelIPOTR" ); + $textLabelIPOTR->setGeometry( Qt::Rect(129, 147, 53, 25) ); + $textLabelIPOTR->setWordWrap( 0 ); + my $parIPOTR = Qt::SpinBox( $addParam ); + $self->{parIPOTR} = $parIPOTR; + $parIPOTR->setObjectName( "parIPOTR" ); + $parIPOTR->setGeometry( Qt::Rect(183, 145, 52, 26) ); + $parIPOTR->setMinimum( 1 ); + $parIPOTR->setMaximum( 3 ); + my $textLabelESB = Qt::Label( $addParam ); + $self->{textLabelESB} = $textLabelESB; + $textLabelESB->setObjectName( "textLabelESB" ); + $textLabelESB->setGeometry( Qt::Rect(10, 46, 63, 25) ); + $textLabelESB->setWordWrap( 0 ); + my $parRD = Qt::LineEdit( $addParam ); + $self->{parRD} = $parRD; + $parRD->setObjectName( "parRD" ); + $parRD->setGeometry( Qt::Rect(75, 122, 52, 25) ); + $sizePolicy7->setHeightForWidth( $parRD->sizePolicy()->hasHeightForWidth() ); + $parRD->setSizePolicy( $sizePolicy7 ); + my $textLabelCA = Qt::Label( $addParam ); + $self->{textLabelCA} = $textLabelCA; + $textLabelCA->setObjectName( "textLabelCA" ); + $textLabelCA->setGeometry( Qt::Rect(10, 147, 63, 25) ); + $textLabelCA->setWordWrap( 0 ); + my $parESB = Qt::LineEdit( $addParam ); + $self->{parESB} = $parESB; + $parESB->setObjectName( "parESB" ); + $parESB->setGeometry( Qt::Rect(75, 46, 52, 25) ); + $sizePolicy7->setHeightForWidth( $parESB->sizePolicy()->hasHeightForWidth() ); + $parESB->setSizePolicy( $sizePolicy7 ); + my $textLabelSHEATH = Qt::Label( $addParam ); + $self->{textLabelSHEATH} = $textLabelSHEATH; + $textLabelSHEATH->setObjectName( "textLabelSHEATH" ); + $textLabelSHEATH->setGeometry( Qt::Rect(10, 71, 63, 25) ); + $textLabelSHEATH->setWordWrap( 0 ); + my $textLabelKDEE2 = Qt::Label( $addParam ); + $self->{textLabelKDEE2} = $textLabelKDEE2; + $textLabelKDEE2->setObjectName( "textLabelKDEE2" ); + $textLabelKDEE2->setGeometry( Qt::Rect(129, 96, 53, 25) ); + $textLabelKDEE2->setWordWrap( 0 ); + my $textLabelKDEE1 = Qt::Label( $addParam ); + $self->{textLabelKDEE1} = $textLabelKDEE1; + $textLabelKDEE1->setObjectName( "textLabelKDEE1" ); + $textLabelKDEE1->setGeometry( Qt::Rect(129, 71, 53, 25) ); + $textLabelKDEE1->setWordWrap( 0 ); + my $parEF = Qt::LineEdit( $addParam ); + $self->{parEF} = $parEF; + $parEF->setObjectName( "parEF" ); + $parEF->setGeometry( Qt::Rect(75, 21, 52, 25) ); + $sizePolicy7->setHeightForWidth( $parEF->sizePolicy()->hasHeightForWidth() ); + $parEF->setSizePolicy( $sizePolicy7 ); + my $lineEditEmpty = Qt::LineEdit( $addParam ); + $self->{lineEditEmpty} = $lineEditEmpty; + $lineEditEmpty->setObjectName( "lineEditEmpty" ); + $lineEditEmpty->setEnabled( 0 ); + $lineEditEmpty->setGeometry( Qt::Rect(75, 170, 52, 25) ); + $sizePolicy7->setHeightForWidth( $lineEditEmpty->sizePolicy()->hasHeightForWidth() ); + $lineEditEmpty->setSizePolicy( $sizePolicy7 ); + my $parKDEE2 = Qt::SpinBox( $addParam ); + $self->{parKDEE2} = $parKDEE2; + $parKDEE2->setObjectName( "parKDEE2" ); + $parKDEE2->setGeometry( Qt::Rect(183, 95, 52, 26) ); + $parKDEE2->setMinimum( 1 ); + $parKDEE2->setMaximum( 3 ); + $parKDEE2->setValue( 3 ); + my $parERC = Qt::LineEdit( $addParam ); + $self->{parERC} = $parERC; + $parERC->setObjectName( "parERC" ); + $parERC->setGeometry( Qt::Rect(75, 96, 52, 26) ); + $sizePolicy7->setHeightForWidth( $parERC->sizePolicy()->hasHeightForWidth() ); + $parERC->setSizePolicy( $sizePolicy7 ); + my $textLabelKK0R = Qt::Label( $addParam ); + $self->{textLabelKK0R} = $textLabelKK0R; + $textLabelKK0R->setObjectName( "textLabelKK0R" ); + $textLabelKK0R->setGeometry( Qt::Rect(129, 46, 53, 25) ); + $textLabelKK0R->setWordWrap( 0 ); + my $textLabelIPOT = Qt::Label( $addParam ); + $self->{textLabelIPOT} = $textLabelIPOT; + $textLabelIPOT->setObjectName( "textLabelIPOT" ); + $textLabelIPOT->setGeometry( Qt::Rect(129, 121, 53, 26) ); + $textLabelIPOT->setWordWrap( 0 ); + my $parIPOT = Qt::SpinBox( $addParam ); + $self->{parIPOT} = $parIPOT; + $parIPOT->setObjectName( "parIPOT" ); + $parIPOT->setGeometry( Qt::Rect(183, 120, 52, 26) ); + $parIPOT->setMinimum( 1 ); + $parIPOT->setMaximum( 3 ); + $parIPOT->setValue( 2 ); + my $textLabelERC = Qt::Label( $addParam ); + $self->{textLabelERC} = $textLabelERC; + $textLabelERC->setObjectName( "textLabelERC" ); + $textLabelERC->setGeometry( Qt::Rect(10, 96, 63, 26) ); + $textLabelERC->setWordWrap( 0 ); + my $parSHEATH = Qt::LineEdit( $addParam ); + $self->{parSHEATH} = $parSHEATH; + $parSHEATH->setObjectName( "parSHEATH" ); + $parSHEATH->setGeometry( Qt::Rect(75, 71, 52, 25) ); + $sizePolicy7->setHeightForWidth( $parSHEATH->sizePolicy()->hasHeightForWidth() ); + $parSHEATH->setSizePolicy( $sizePolicy7 ); + my $parKDEE1 = Qt::SpinBox( $addParam ); + $self->{parKDEE1} = $parKDEE1; + $parKDEE1->setObjectName( "parKDEE1" ); + $parKDEE1->setGeometry( Qt::Rect(183, 70, 52, 26) ); + $parKDEE1->setMinimum( 1 ); + $parKDEE1->setMaximum( 5 ); + $parKDEE1->setValue( 4 ); + $tabs->addTab( $addParTab, Qt::Application::translate( 'TrimSPGUI4', "Additional Parameters", undef, Qt::Application::UnicodeUTF8() ) ); + my $scansTab = Qt::Widget( ); + $self->{scansTab} = $scansTab; + $scansTab->setObjectName( "scansTab" ); + my $scanSeq = Qt::GroupBox( $scansTab ); + $self->{scanSeq} = $scanSeq; + $scanSeq->setObjectName( "scanSeq" ); + $scanSeq->setGeometry( Qt::Rect(10, 10, 421, 221) ); + $scanSeq->setCheckable( 1 ); + $scanSeq->setChecked( 0 ); + my $layoutWidget = Qt::Widget( $scanSeq ); + $self->{layoutWidget} = $layoutWidget; + $layoutWidget->setObjectName( "layoutWidget" ); + $layoutWidget->setGeometry( Qt::Rect(10, 20, 401, 191) ); + my $verticalLayout = Qt::VBoxLayout( $layoutWidget ); + $self->{verticalLayout} = $verticalLayout; + $verticalLayout->setSpacing( 6 ); + $verticalLayout->setMargin( 11 ); + $verticalLayout->setObjectName( "verticalLayout" ); + $verticalLayout->setContentsMargins(0, 0, 0, 0 ); + my $horizontalLayout_3 = Qt::HBoxLayout( ); + $self->{horizontalLayout_3} = $horizontalLayout_3; + $horizontalLayout_3->setSpacing( 6 ); + $horizontalLayout_3->setObjectName( "horizontalLayout_3" ); + my $label = Qt::Label( $layoutWidget ); + $self->{label} = $label; + $label->setObjectName( "label" ); + + $horizontalLayout_3->addWidget( $label ); + + my $comboScan = Qt::ComboBox( $layoutWidget ); + $self->{comboScan} = $comboScan; + $comboScan->setObjectName( "comboScan" ); + my $sizePolicy8 = Qt::SizePolicy( Qt::SizePolicy::Preferred(), Qt::SizePolicy::Fixed() ); + $self->{$sizePolicy8} = $sizePolicy8; + $sizePolicy8->setHorizontalStretch( 0 ); + $sizePolicy8->setVerticalStretch( 0 ); + $sizePolicy8->setHeightForWidth( $comboScan->sizePolicy()->hasHeightForWidth() ); + $comboScan->setSizePolicy( $sizePolicy8 ); + + $horizontalLayout_3->addWidget( $comboScan ); + + my $scandL = Qt::SpinBox( $layoutWidget ); + $self->{scandL} = $scandL; + $scandL->setObjectName( "scandL" ); + $scandL->setEnabled( 0 ); + $scandL->setMinimum( 1 ); + $scandL->setMaximum( 7 ); + + $horizontalLayout_3->addWidget( $scandL ); + + + $verticalLayout->addLayout( $horizontalLayout_3 ); + + my $radioList = Qt::RadioButton( $layoutWidget ); + $self->{radioList} = $radioList; + $radioList->setObjectName( "radioList" ); + + $verticalLayout->addWidget( $radioList ); + + my $scanList = Qt::LineEdit( $layoutWidget ); + $self->{scanList} = $scanList; + $scanList->setObjectName( "scanList" ); + + $verticalLayout->addWidget( $scanList ); + + my $dzListLabel = Qt::Label( $layoutWidget ); + $self->{dzListLabel} = $dzListLabel; + $dzListLabel->setObjectName( "dzListLabel" ); + $dzListLabel->setWordWrap( 0 ); + + $verticalLayout->addWidget( $dzListLabel ); + + my $scanListdz = Qt::LineEdit( $layoutWidget ); + $self->{scanListdz} = $scanListdz; + $scanListdz->setObjectName( "scanListdz" ); + $scanListdz->setEnabled( 0 ); + + $verticalLayout->addWidget( $scanListdz ); + + my $radioLoop = Qt::RadioButton( $layoutWidget ); + $self->{radioLoop} = $radioLoop; + $radioLoop->setObjectName( "radioLoop" ); + $radioLoop->setChecked( 1 ); + + $verticalLayout->addWidget( $radioLoop ); + + my $scanLoop = Qt::HBoxLayout( ); + $self->{scanLoop} = $scanLoop; + $scanLoop->setSpacing( 0 ); + $scanLoop->setMargin( 0 ); + $scanLoop->setObjectName( "scanLoop" ); + my $textLabel2 = Qt::Label( $layoutWidget ); + $self->{textLabel2} = $textLabel2; + $textLabel2->setObjectName( "textLabel2" ); + $textLabel2->setWordWrap( 0 ); + + $scanLoop->addWidget( $textLabel2 ); + + my $scanFrom = Qt::LineEdit( $layoutWidget ); + $self->{scanFrom} = $scanFrom; + $scanFrom->setObjectName( "scanFrom" ); + $sizePolicy8->setHeightForWidth( $scanFrom->sizePolicy()->hasHeightForWidth() ); + $scanFrom->setSizePolicy( $sizePolicy8 ); + + $scanLoop->addWidget( $scanFrom ); + + my $textLabel2_2 = Qt::Label( $layoutWidget ); + $self->{textLabel2_2} = $textLabel2_2; + $textLabel2_2->setObjectName( "textLabel2_2" ); + $textLabel2_2->setWordWrap( 0 ); + + $scanLoop->addWidget( $textLabel2_2 ); + + my $scanTo = Qt::LineEdit( $layoutWidget ); + $self->{scanTo} = $scanTo; + $scanTo->setObjectName( "scanTo" ); + $sizePolicy8->setHeightForWidth( $scanTo->sizePolicy()->hasHeightForWidth() ); + $scanTo->setSizePolicy( $sizePolicy8 ); + + $scanLoop->addWidget( $scanTo ); + + my $textLabel2_2_2_2 = Qt::Label( $layoutWidget ); + $self->{textLabel2_2_2_2} = $textLabel2_2_2_2; + $textLabel2_2_2_2->setObjectName( "textLabel2_2_2_2" ); + $textLabel2_2_2_2->setWordWrap( 0 ); + + $scanLoop->addWidget( $textLabel2_2_2_2 ); + + my $scanStep = Qt::LineEdit( $layoutWidget ); + $self->{scanStep} = $scanStep; + $scanStep->setObjectName( "scanStep" ); + $sizePolicy8->setHeightForWidth( $scanStep->sizePolicy()->hasHeightForWidth() ); + $scanStep->setSizePolicy( $sizePolicy8 ); + + $scanLoop->addWidget( $scanStep ); + + + $verticalLayout->addLayout( $scanLoop ); + + $tabs->addTab( $scansTab, Qt::Application::translate( 'TrimSPGUI4', "Scans (Disbaled)", undef, Qt::Application::UnicodeUTF8() ) ); + + $gridLayout->addWidget( $tabs, 0, 0, 1, 1 ); + + $trimSPGUI4->setCentralWidget( $widget ); + my $menuBar = Qt::MenuBar( $trimSPGUI4 ); + $self->{menuBar} = $menuBar; + $menuBar->setObjectName( "menuBar" ); + $menuBar->setGeometry( Qt::Rect(0, 0, 722, 19) ); + my $file = Qt::Menu( $menuBar ); + $self->{file} = $file; + $file->setObjectName( "file" ); + my $plot = Qt::Menu( $menuBar ); + $self->{plot} = $plot; + $plot->setObjectName( "plot" ); + my $helpMenu = Qt::Menu( $menuBar ); + $self->{helpMenu} = $helpMenu; + $helpMenu->setObjectName( "helpMenu" ); + $trimSPGUI4->setMenuBar( $menuBar ); + Qt::Widget::setTabOrder( $tabs, $numLayer ); + Qt::Widget::setTabOrder( $numLayer, $layer1Comp ); + Qt::Widget::setTabOrder( $layer1Comp, $layer1rho ); + Qt::Widget::setTabOrder( $layer1rho, $layer1d ); + Qt::Widget::setTabOrder( $layer1d, $layer2Comp ); + Qt::Widget::setTabOrder( $layer2Comp, $layer2rho ); + Qt::Widget::setTabOrder( $layer2rho, $layer2d ); + Qt::Widget::setTabOrder( $layer2d, $layer3Comp ); + Qt::Widget::setTabOrder( $layer3Comp, $layer3rho ); + Qt::Widget::setTabOrder( $layer3rho, $layer3d ); + Qt::Widget::setTabOrder( $layer3d, $layer4Comp ); + Qt::Widget::setTabOrder( $layer4Comp, $layer4rho ); + Qt::Widget::setTabOrder( $layer4rho, $layer4d ); + Qt::Widget::setTabOrder( $layer4d, $layer5Comp ); + Qt::Widget::setTabOrder( $layer5Comp, $layer5rho ); + Qt::Widget::setTabOrder( $layer5rho, $layer5d ); + Qt::Widget::setTabOrder( $layer5d, $layer6Comp ); + Qt::Widget::setTabOrder( $layer6Comp, $layer6rho ); + Qt::Widget::setTabOrder( $layer6rho, $layer6d ); + Qt::Widget::setTabOrder( $layer6d, $layer7Comp ); + Qt::Widget::setTabOrder( $layer7Comp, $layer7rho ); + Qt::Widget::setTabOrder( $layer7rho, $layer7d ); + Qt::Widget::setTabOrder( $layer7d, $projComboBox ); + Qt::Widget::setTabOrder( $projComboBox, $numberProj ); + Qt::Widget::setTabOrder( $numberProj, $z0 ); + Qt::Widget::setTabOrder( $z0, $dz ); + Qt::Widget::setTabOrder( $dz, $valEnergy ); + Qt::Widget::setTabOrder( $valEnergy, $sigEnergy ); + Qt::Widget::setTabOrder( $sigEnergy, $valAngle ); + Qt::Widget::setTabOrder( $valAngle, $sigAngle ); + Qt::Widget::setTabOrder( $sigAngle, $ranSeed ); + Qt::Widget::setTabOrder( $ranSeed, $fileNamePrefix ); + Qt::Widget::setTabOrder( $fileNamePrefix, $workPath ); + Qt::Widget::setTabOrder( $workPath, $browse ); + Qt::Widget::setTabOrder( $browse, $start ); + Qt::Widget::setTabOrder( $start, $quit ); + Qt::Widget::setTabOrder( $quit, $parEF ); + Qt::Widget::setTabOrder( $parEF, $parESB ); + Qt::Widget::setTabOrder( $parESB, $parSHEATH ); + Qt::Widget::setTabOrder( $parSHEATH, $parERC ); + Qt::Widget::setTabOrder( $parERC, $parRD ); + Qt::Widget::setTabOrder( $parRD, $parCA ); + Qt::Widget::setTabOrder( $parCA, $lineEditEmpty ); + Qt::Widget::setTabOrder( $lineEditEmpty, $parKK0 ); + Qt::Widget::setTabOrder( $parKK0, $parKK0R ); + Qt::Widget::setTabOrder( $parKK0R, $parKDEE1 ); + Qt::Widget::setTabOrder( $parKDEE1, $parKDEE2 ); + Qt::Widget::setTabOrder( $parKDEE2, $parIPOT ); + Qt::Widget::setTabOrder( $parIPOT, $parIPOTR ); + Qt::Widget::setTabOrder( $parIPOTR, $parIRL ); + Qt::Widget::setTabOrder( $parIRL, $scanSeq ); + Qt::Widget::setTabOrder( $scanSeq, $radioList ); + Qt::Widget::setTabOrder( $radioList, $scanList ); + Qt::Widget::setTabOrder( $scanList, $scanListdz ); + Qt::Widget::setTabOrder( $scanListdz, $radioLoop ); + Qt::Widget::setTabOrder( $radioLoop, $scanFrom ); + Qt::Widget::setTabOrder( $scanFrom, $scanTo ); + Qt::Widget::setTabOrder( $scanTo, $scanStep ); + + $menuBar->addAction( $file->menuAction() ); + $menuBar->addAction( $plot->menuAction() ); + $menuBar->addAction( $helpMenu->menuAction() ); + $file->addAction( $fileStartAction ); + $file->addSeparator(); + $file->addAction( $fileOpenAction ); + $file->addAction( $fileSaveAction ); + $file->addAction( $fileSaveAsAction ); + $file->addSeparator(); + $file->addAction( $fileChangeDirAction ); + $file->addAction( $fileQuitAction ); + $plot->addAction( $plotProfilesAction ); + $plot->addAction( $plotFractionsAction ); + $helpMenu->addAction( $helpContentsAction ); + $helpMenu->addAction( $helpAboutAction ); + + $self->retranslateUi( $trimSPGUI4 ); + Qt::Object::connect($start, SIGNAL 'clicked()' , $trimSPGUI4, SLOT 'CollectValues()' ); + Qt::Object::connect($numLayer, SIGNAL 'valueChanged(int)' , $trimSPGUI4, SLOT 'PrepLayers()' ); + Qt::Object::connect($browse, SIGNAL 'clicked()' , $trimSPGUI4, SLOT 'DirectoryBrowse()' ); + Qt::Object::connect($quit, SIGNAL 'clicked()' , $trimSPGUI4, SLOT 'ConfirmQuit()' ); + Qt::Object::connect($fileSaveAction, SIGNAL 'activated()' , $trimSPGUI4, SLOT 'SaveFile()' ); + Qt::Object::connect($fileQuitAction, SIGNAL 'activated()' , $trimSPGUI4, SLOT 'close()' ); + Qt::Object::connect($fileSaveAsAction, SIGNAL 'activated()' , $trimSPGUI4, SLOT 'SaveFileAs()' ); + Qt::Object::connect($fileChangeDirAction, SIGNAL 'activated()' , $trimSPGUI4, SLOT 'DirectoryBrowse()' ); + Qt::Object::connect($plotFractionsAction, SIGNAL 'activated()' , $trimSPGUI4, SLOT 'PlotFraction()' ); + Qt::Object::connect($plotProfilesAction, SIGNAL 'activated()' , $trimSPGUI4, SLOT 'PlotProfiles()' ); + Qt::Object::connect($start, SIGNAL 'clicked()' , $trimSPGUI4, SLOT 'StartSequenceOne()' ); + Qt::Object::connect($fileOpenAction, SIGNAL 'activated()' , $trimSPGUI4, SLOT 'OpenFile()' ); + Qt::Object::connect($helpAboutAction, SIGNAL 'activated()' , $trimSPGUI4, SLOT 'helpAboutAction()' ); + Qt::Object::connect($helpContentsAction, SIGNAL 'activated()' , $trimSPGUI4, SLOT 'helpContentsAction()' ); + Qt::Object::connect($numberProj, SIGNAL 'editingFinished()' , $trimSPGUI4, SLOT 'test()' ); + Qt::Object::connect($scanSeq, SIGNAL 'toggled(bool)' , $trimSPGUI4, SLOT 'ToggleScanSingle()' ); + Qt::Object::connect($comboScan, SIGNAL 'currentIndexChanged(int)' , $trimSPGUI4, SLOT 'ToggleScanSingle()' ); + Qt::Object::connect($radioList, SIGNAL 'toggled(bool)' , $trimSPGUI4, SLOT 'ToggleScanSingle()' ); + Qt::Object::connect($radioLoop, SIGNAL 'toggled(bool)' , $trimSPGUI4, SLOT 'ToggleScanSingle()' ); + Qt::Object::connect($scandL, SIGNAL 'valueChanged(int)' , $trimSPGUI4, SLOT 'ToggleScanSingle()' ); + Qt::Object::connect($projComboBox, SIGNAL 'currentIndexChanged(int)' , $trimSPGUI4, SLOT 'ProjSmartDefaults()' ); + + $tabs->setCurrentIndex( 0 ); + + + Qt::MetaObject::connectSlotsByName( $trimSPGUI4 ); + return $self; +} # setupUi + +sub setup_ui { + my ( $trimSPGUI4 ) = @_; + return setupUi( $trimSPGUI4 ); +} + +sub retranslateUi { + my ( $self, $trimSPGUI4 ) = @_; + $trimSPGUI4->setWindowTitle( Qt::Application::translate( 'TrimSPGUI4', "TrimSP GUI", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileSaveAction}->setText( Qt::Application::translate( 'TrimSPGUI4', "&Save", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileSaveAction}->setIconText( Qt::Application::translate( 'TrimSPGUI4', "Save", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileSaveAction}->setShortcut( Qt::KeySequence( Qt::Application::translate( 'TrimSPGUI4', "Ctrl+S", undef, Qt::Application::UnicodeUTF8() ) ) ); + $self->{fileSaveAsAction}->setText( Qt::Application::translate( 'TrimSPGUI4', "Save &As...", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileSaveAsAction}->setIconText( Qt::Application::translate( 'TrimSPGUI4', "Save As", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileSaveAsAction}->setShortcut( Qt::KeySequence( '' ) ); + $self->{fileChangeDirAction}->setText( Qt::Application::translate( 'TrimSPGUI4', "&Change Folder", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileChangeDirAction}->setIconText( Qt::Application::translate( 'TrimSPGUI4', "Change Folder", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileChangeDirAction}->setShortcut( Qt::KeySequence( Qt::Application::translate( 'TrimSPGUI4', "Ctrl+C", undef, Qt::Application::UnicodeUTF8() ) ) ); + $self->{fileQuitAction}->setText( Qt::Application::translate( 'TrimSPGUI4', "&Quit", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileQuitAction}->setIconText( Qt::Application::translate( 'TrimSPGUI4', "Quit", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileQuitAction}->setShortcut( Qt::KeySequence( Qt::Application::translate( 'TrimSPGUI4', "Ctrl+Q", undef, Qt::Application::UnicodeUTF8() ) ) ); + $self->{plotProfilesAction}->setText( Qt::Application::translate( 'TrimSPGUI4', "&Plot Profiles", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{plotProfilesAction}->setIconText( Qt::Application::translate( 'TrimSPGUI4', "&Plot Profiles", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{plotProfilesAction}->setShortcut( Qt::KeySequence( Qt::Application::translate( 'TrimSPGUI4', "Ctrl+P, Ctrl+R", undef, Qt::Application::UnicodeUTF8() ) ) ); + $self->{helpContentsAction}->setText( Qt::Application::translate( 'TrimSPGUI4', "&Contents...", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{helpContentsAction}->setIconText( Qt::Application::translate( 'TrimSPGUI4', "Contents", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{helpContentsAction}->setShortcut( Qt::KeySequence( '' ) ); + $self->{helpAboutAction}->setText( Qt::Application::translate( 'TrimSPGUI4', "&About", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{helpAboutAction}->setIconText( Qt::Application::translate( 'TrimSPGUI4', "About", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{helpAboutAction}->setShortcut( Qt::KeySequence( '' ) ); + $self->{plotFractionsAction}->setText( Qt::Application::translate( 'TrimSPGUI4', "Plot Fractions", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{plotFractionsAction}->setIconText( Qt::Application::translate( 'TrimSPGUI4', "Plot Fractions", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{plotFractionsAction}->setShortcut( Qt::KeySequence( Qt::Application::translate( 'TrimSPGUI4', "Ctrl+P, Ctrl+F", undef, Qt::Application::UnicodeUTF8() ) ) ); + $self->{fileStartAction}->setText( Qt::Application::translate( 'TrimSPGUI4', "Start", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileStartAction}->setIconText( Qt::Application::translate( 'TrimSPGUI4', "&Start", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileStartAction}->setShortcut( Qt::KeySequence( Qt::Application::translate( 'TrimSPGUI4', "Alt+S", undef, Qt::Application::UnicodeUTF8() ) ) ); + $self->{fileOpenAction}->setText( Qt::Application::translate( 'TrimSPGUI4', "&Open...", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileOpenAction}->setIconText( Qt::Application::translate( 'TrimSPGUI4', "Open", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileOpenAction}->setShortcut( Qt::KeySequence( Qt::Application::translate( 'TrimSPGUI4', "Ctrl+O", undef, Qt::Application::UnicodeUTF8() ) ) ); + $self->{groupBox1}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "Layers", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabel1_4}->setText( Qt::Application::translate( 'TrimSPGUI4', "Number of Layers", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabel2_4}->setToolTip( Qt::Application::translate( 'TrimSPGUI4', "Chemical formula", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabel2_4}->setText( Qt::Application::translate( 'TrimSPGUI4', "Composition", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabel3}->setText( Qt::Application::translate( 'TrimSPGUI4', "Density [g/cm3]", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabel4}->setText( Qt::Application::translate( 'TrimSPGUI4', "Thickness [\303\205]", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{boxL1}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "Layer 1", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{layer1Comp}->setToolTip( Qt::Application::translate( 'TrimSPGUI4', "Chemical formula of L1", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{layer1Comp}->setText( Qt::Application::translate( 'TrimSPGUI4', "SrTiO3", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{layer1rho}->setText( Qt::Application::translate( 'TrimSPGUI4', "5.12", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{layer1d}->setText( Qt::Application::translate( 'TrimSPGUI4', "200", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{boxL2}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "Layer 2", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{boxL3}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "Layer 3", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{boxL4}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "Layer 4", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{boxL5}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "Layer 5", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{boxL6}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "Layer 6", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{boxL7}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "Layer 7", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{projParam}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "Projectile parameters", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{z0Label}->setText( Qt::Application::translate( 'TrimSPGUI4', "Starting depth [\303\205]", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{numberLabel}->setText( Qt::Application::translate( 'TrimSPGUI4', "Number of projectiles", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{projComboBox}->insertItems(0, [Qt::Application::translate( 'TrimSPGUI4', "Muon", undef, Qt::Application::UnicodeUTF8() ), + Qt::Application::translate( 'TrimSPGUI4', "Li8", undef, Qt::Application::UnicodeUTF8() ), + Qt::Application::translate( 'TrimSPGUI4', "B12", undef, Qt::Application::UnicodeUTF8() ), + Qt::Application::translate( 'TrimSPGUI4', "H", undef, Qt::Application::UnicodeUTF8() )]); + $self->{dz}->setText( Qt::Application::translate( 'TrimSPGUI4', "10.0", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{energyLabel}->setText( Qt::Application::translate( 'TrimSPGUI4', "Energy [eV]", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{numberProj}->setText( Qt::Application::translate( 'TrimSPGUI4', "10000", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabel1}->setText( Qt::Application::translate( 'TrimSPGUI4', "Projectile", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{valAngle}->setText( Qt::Application::translate( 'TrimSPGUI4', "0", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{sigAngleLabel}->setText( Qt::Application::translate( 'TrimSPGUI4', "Angle sigma [deg]", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{sigAngle}->setText( Qt::Application::translate( 'TrimSPGUI4', "15", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{seedLabel}->setText( Qt::Application::translate( 'TrimSPGUI4', "Random seed", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{sigEnergy}->setText( Qt::Application::translate( 'TrimSPGUI4', "450", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{z0}->setText( Qt::Application::translate( 'TrimSPGUI4', "0.0", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{valEnergy}->setText( Qt::Application::translate( 'TrimSPGUI4', "2000", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{ranSeed}->setText( Qt::Application::translate( 'TrimSPGUI4', "78741", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{albleLabel}->setText( Qt::Application::translate( 'TrimSPGUI4', "Angle [deg]", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{sigELabel}->setText( Qt::Application::translate( 'TrimSPGUI4', "Energy sigma [eV]", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{dzLabel}->setText( Qt::Application::translate( 'TrimSPGUI4', "Depth increment [\303\205]", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{groupBox15}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "File Names", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelFN}->setText( Qt::Application::translate( 'TrimSPGUI4', "File names prefix", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{fileNamePrefix}->setText( Qt::Application::translate( 'TrimSPGUI4', "SrTiO3", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelPath}->setText( Qt::Application::translate( 'TrimSPGUI4', "Save in subdirectory", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{workPath}->setText( Qt::Application::translate( 'TrimSPGUI4', "./", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{browse}->setText( Qt::Application::translate( 'TrimSPGUI4', "Browse", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{start}->setToolTip( Qt::Application::translate( 'TrimSPGUI4', "Start", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{start}->setText( Qt::Application::translate( 'TrimSPGUI4', "Start", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{quit}->setToolTip( Qt::Application::translate( 'TrimSPGUI4', "Quit", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{quit}->setText( Qt::Application::translate( 'TrimSPGUI4', "Quit", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{tabs}->setTabText( $self->{tabs}->indexOf( $self->{layersTab}), Qt::Application::translate( 'TrimSPGUI4', "Layers", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{addParam}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "Additional parameters", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelEmpty}->setText( '' ); + $self->{textLabelEF}->setText( Qt::Application::translate( 'TrimSPGUI4', "EF", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{parCA}->setText( Qt::Application::translate( 'TrimSPGUI4', "1.0", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelIRL}->setText( Qt::Application::translate( 'TrimSPGUI4', "IRL", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelKK0}->setText( Qt::Application::translate( 'TrimSPGUI4', "KK0", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelRD}->setText( Qt::Application::translate( 'TrimSPGUI4', "RD", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelIPOTR}->setText( Qt::Application::translate( 'TrimSPGUI4', "IPOTR", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelESB}->setText( Qt::Application::translate( 'TrimSPGUI4', "ESB", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{parRD}->setText( Qt::Application::translate( 'TrimSPGUI4', "50.0", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelCA}->setText( Qt::Application::translate( 'TrimSPGUI4', "CA", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{parESB}->setText( Qt::Application::translate( 'TrimSPGUI4', "0.0", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelSHEATH}->setText( Qt::Application::translate( 'TrimSPGUI4', "SHEATH", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelKDEE2}->setText( Qt::Application::translate( 'TrimSPGUI4', "KDEE2", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelKDEE1}->setText( Qt::Application::translate( 'TrimSPGUI4', "KDEE1", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{parEF}->setText( Qt::Application::translate( 'TrimSPGUI4', "0.5", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{lineEditEmpty}->setText( '' ); + $self->{parERC}->setText( Qt::Application::translate( 'TrimSPGUI4', "0.0", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelKK0R}->setText( Qt::Application::translate( 'TrimSPGUI4', "KK0R", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelIPOT}->setText( Qt::Application::translate( 'TrimSPGUI4', "IPOT", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabelERC}->setText( Qt::Application::translate( 'TrimSPGUI4', "ERC", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{parSHEATH}->setText( Qt::Application::translate( 'TrimSPGUI4', "0.0", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{tabs}->setTabText( $self->{tabs}->indexOf( $self->{addParTab}), Qt::Application::translate( 'TrimSPGUI4', "Additional Parameters", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{scanSeq}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "Scan sequence", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{label}->setText( Qt::Application::translate( 'TrimSPGUI4', "Scan", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{comboScan}->insertItems(0, [Qt::Application::translate( 'TrimSPGUI4', "Energy", undef, Qt::Application::UnicodeUTF8() ), + Qt::Application::translate( 'TrimSPGUI4', "Energy Sigma", undef, Qt::Application::UnicodeUTF8() ), + Qt::Application::translate( 'TrimSPGUI4', "Angle", undef, Qt::Application::UnicodeUTF8() ), + Qt::Application::translate( 'TrimSPGUI4', "Angle Sigma", undef, Qt::Application::UnicodeUTF8() ), + Qt::Application::translate( 'TrimSPGUI4', "Number of Projectiles", undef, Qt::Application::UnicodeUTF8() ), + Qt::Application::translate( 'TrimSPGUI4', "Thickness of layer", undef, Qt::Application::UnicodeUTF8() )]); + $self->{radioList}->setText( Qt::Application::translate( 'TrimSPGUI4', "List of values", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{scanList}->setText( Qt::Application::translate( 'TrimSPGUI4', "1000,6000,10000", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{dzListLabel}->setText( Qt::Application::translate( 'TrimSPGUI4', "Corresponding depth increment (optional)", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{scanListdz}->setText( '' ); + $self->{radioLoop}->setText( Qt::Application::translate( 'TrimSPGUI4', "Loop", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabel2}->setText( Qt::Application::translate( 'TrimSPGUI4', "From", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{scanFrom}->setText( Qt::Application::translate( 'TrimSPGUI4', "1000", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabel2_2}->setText( Qt::Application::translate( 'TrimSPGUI4', "To", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{scanTo}->setText( Qt::Application::translate( 'TrimSPGUI4', "28000", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{textLabel2_2_2_2}->setText( Qt::Application::translate( 'TrimSPGUI4', "Step", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{scanStep}->setText( Qt::Application::translate( 'TrimSPGUI4', "1000", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{tabs}->setTabText( $self->{tabs}->indexOf( $self->{scansTab}), Qt::Application::translate( 'TrimSPGUI4', "Scans (Disbaled)", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{file}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "&File", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{plot}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "&Plot", undef, Qt::Application::UnicodeUTF8() ) ); + $self->{helpMenu}->setTitle( Qt::Application::translate( 'TrimSPGUI4', "&Help", undef, Qt::Application::UnicodeUTF8() ) ); +} # retranslateUi + +sub retranslate_ui { + my ( $trimSPGUI4 ) = @_; + retranslateUi( $trimSPGUI4 ); +} + +1; \ No newline at end of file diff --git a/trimsp/TrimSPGUI4/densities.dat b/trimsp/TrimSPGUI4/densities.dat new file mode 100644 index 0000000..0104728 --- /dev/null +++ b/trimsp/TrimSPGUI4/densities.dat @@ -0,0 +1,18 @@ +% list of densities in gr/cm^3 +NbN,8.47 +Bi2Se3,7.51 +N2,1.145 +ZnO,5.61 +SiO2,2.65 +TiO2,4.26 +KTaO3,6.967 +LaAlO3,6.70 +Al2O3,3.98 +SrTiO3,5.12 +NbSe2,6.30 +MgO,3.58 +YBa2Cu3O7,6.54 +GaAs,5.32 +Si,2.33 +Mn12-Acetate,1.65 +C60,1.65 diff --git a/trimsp/TrimSPGUI4/icon.odg b/trimsp/TrimSPGUI4/icon.odg new file mode 100644 index 0000000..5ca0153 Binary files /dev/null and b/trimsp/TrimSPGUI4/icon.odg differ diff --git a/trimsp/TrimSPGUI4/icon.png b/trimsp/TrimSPGUI4/icon.png new file mode 100644 index 0000000..595fc80 Binary files /dev/null and b/trimsp/TrimSPGUI4/icon.png differ diff --git a/trimsp/TrimSPGUI4/plotFrc.C b/trimsp/TrimSPGUI4/plotFrc.C new file mode 100644 index 0000000..387a348 --- /dev/null +++ b/trimsp/TrimSPGUI4/plotFrc.C @@ -0,0 +1,232 @@ +// File: plotFrc.C +// Author: Zaher Salman +// Date: 11/01/2012 +// Purpose: ROOT macro to read and plot implantation fractions in layers from trimsp calculation +// Assume following file Format: +// +// $Id$ +// +// Energy SigmaE Alpha SigAlpha ntot imp backsc trans tried negE impL1 impL2 impL3 impL4 impL5 impL6 impL7 range straggeling Eback sigEback Etrans SigEtrans red. E PRC +// 15.00 0.45 0.00 15.00 100000 98362 1638 0 100000 0 98362 0 0 0 0 0 0 0.6664E+03 0.1799E+03 0.4980E+04 0.4250E+04 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 +// plotFrc(file_name) + +void plotFrc(char *FileName) +{ + TObjString *ostr; + TString str,xlab,ylab; + + TString line, label, treeLabel; + TString rootFileName; + TObjArray *token,*labels; + TObjString *strtoken; + Int_t nPars = 0; + Int_t ntokens = 0; + Int_t i = 0; + Int_t nline=0; + Int_t intNorm=0; + Ssiz_t pos; + Double_t x[100],yl1[100],yl2[100],yl3[100],yl4[100],yl5[100],yl6[100],yl7[100],bck[100]; + Int_t Flag[7]=0; + + FILE *fp = fopen(FileName,"r"); + if ( fp == NULL ){ + printf("File %s does not exist!\n", FileName); + return; + } + + while (line.Gets(fp)){ + if ( nline==0 ){ + // First line, get data labels + nline++; + labels = line.Tokenize(" "); + ntokens = labels->GetEntries(); + nPars=ntokens; + ostr = dynamic_cast(labels->At(0)); + xlab = ostr->GetString(); + ylab = ostr->GetString(); + + } else { + token = line.Tokenize(" "); + ntokens = token->GetEntries(); + + strtoken = (TObjString*) token->At(0); + label = strtoken->GetName(); + x[i] = label.Atof(); + + // Plot all layers for now. Maybe stop when sum is zero in the future + // Layers start from column # 10 up to 16. + // for (col=10;col<17;col++) { + strtoken = (TObjString*) token->At(6); + label = strtoken->GetName(); + bck[i] = label.Atof(); + if (bck[i]>0) { + Flag[7]=1; + intNorm = intNorm++; + } + + strtoken = (TObjString*) token->At(10); + label = strtoken->GetName(); + yl1[i] = label.Atof(); + if (yl1[i]>0) { + Flag[0]=1; + intNorm = intNorm++; + } + + strtoken = (TObjString*) token->At(11); + label = strtoken->GetName(); + yl2[i] = label.Atof(); + if (yl2[i]>0) { + Flag[1]=1; + intNorm = intNorm++; + } + + strtoken = (TObjString*) token->At(12); + label = strtoken->GetName(); + yl3[i] = label.Atof(); + if (yl3[i]>0) { + Flag[2]=1; + intNorm = intNorm++; + } + + strtoken = (TObjString*) token->At(13); + label = strtoken->GetName(); + yl4[i] = label.Atof(); + if (yl4[i]>0) { + Flag[3]=1; + intNorm = intNorm++; + } + + strtoken = (TObjString*) token->At(14); + label = strtoken->GetName(); + yl5[i] = label.Atof(); + if (yl5[i]>0) { + Flag[4]=1; + intNorm = intNorm++; + } + + strtoken = (TObjString*) token->At(15); + label = strtoken->GetName(); + yl6[i] = label.Atof(); + if (yl6[i]>0) { + Flag[5]=1; + intNorm = intNorm++; + } + + strtoken = (TObjString*) token->At(16); + label = strtoken->GetName(); + yl7[i] = label.Atof(); + if (yl7[i]>0) { + Flag[6]=1; + intNorm = intNorm++; + } + + //} + + nline++; + i++; + } + } + + + TCanvas *c = new TCanvas("c",str); + c->Show(); + TLegend *legend = new TLegend(0.8, 0.8, 0.95, 0.95); + legend->SetFillColor(TColor::GetColor(255,255,255)); // white + + TMultiGraph *mg = new TMultiGraph(); + + if (Flag[0]==1){ + TGraph *gr1 = new TGraph(i-1,x,yl1); + gr1->GetXaxis()->SetTitle(xlab); + gr1->GetYaxis()->SetTitle("Implanted Fraction"); + // gr1->Draw("APC"); + gr1->SetMarkerStyle(20); + gr1->SetMarkerColor(TColor::kRed); + gr1->SetLineColor(TColor::kRed); + legend->AddEntry(gr1,"Layer 1"); + mg->Add(gr1); + } + + if (Flag[1]==1){ + TGraph *gr2 = new TGraph(i-1,x,yl2); + gr2->SetMarkerStyle(20); + gr2->SetMarkerColor(TColor::kGreen); + gr2->SetLineColor(TColor::kGreen); + // gr2->Draw("PC"); + legend->AddEntry(gr2,"Layer 2"); + mg->Add(gr2); + } + + if (Flag[2]==1){ + TGraph *gr3 = new TGraph(i-1,x,yl3); + gr3->SetMarkerStyle(20); + gr3->SetMarkerColor(TColor::kBlue); + gr3->SetLineColor(TColor::kBlue); + // gr3->Draw("PC"); + legend->AddEntry(gr3,"Layer 3"); + mg->Add(gr3); + } + + if (Flag[3]==1){ + TGraph *gr4 = new TGraph(i-1,x,yl4); + gr4->SetMarkerStyle(20); + gr4->SetMarkerColor(TColor::kMagenta); + gr4->SetLineColor(TColor::kMagenta); + // gr4->Draw("PC"); + legend->AddEntry(gr4,"Layer 4"); + mg->Add(gr4); + } + + if (Flag[4]==1){ + TGraph *gr5 = new TGraph(i-1,x,yl5); + gr5->SetMarkerStyle(20); + gr5->SetMarkerColor(TColor::kOrange); + gr5->SetLineColor(TColor::kOrange); + // gr5->Draw("PC"); + legend->AddEntry(gr5,"Layer 5"); + mg->Add(gr5); + } + + if (Flag[5]==1){ + TGraph *gr6 = new TGraph(i-1,x,yl6); + gr6->SetMarkerStyle(20); + gr6->SetMarkerColor(TColor::kViolet); + gr6->SetLineColor(TColor::kViolet); + // gr6->Draw("PC"); + legend->AddEntry(gr6,"Layer 6"); + mg->Add(gr6); + } + + if (Flag[6]==1){ + TGraph *gr7 = new TGraph(i-1,x,yl7); + gr7->SetMarkerStyle(20); + gr7->SetMarkerColor(TColor::kAzure+7); + gr7->SetLineColor(TColor::kAzure+7); + // gr7->Draw("PC"); + legend->AddEntry(gr7,"Layer 7"); + mg->Add(gr7); + } + + if (Flag[7]==1){ + TGraph *gr8 = new TGraph(i-1,x,bck); + gr8->SetMarkerStyle(20); + gr8->SetMarkerColor(TColor::kAzure+7); + gr8->SetLineColor(TColor::kAzure+7); + // gr8->Draw("PC"); + legend->AddEntry(gr8,"Back Scat."); + mg->Add(gr8); + } + + mg->Draw("APC"); + mg->GetXaxis()->SetTitle("Energy [keV]"); + mg->GetYaxis()->SetTitle("Implanted Particles"); + legend->Draw(); + + // I am not sure what this does, but it waits until canvas is closed + c->WaitPrimitive(" "); + cout << endl << "Canvas Closed" << endl ; + + // Then quit root cleanly + gApplication->Terminate(); +} + diff --git a/trimsp/TrimSPGUI4/plotRge.C b/trimsp/TrimSPGUI4/plotRge.C new file mode 100644 index 0000000..224da00 --- /dev/null +++ b/trimsp/TrimSPGUI4/plotRge.C @@ -0,0 +1,182 @@ +// File: plotRge.C +// Author: Zaher Salman, originally by Andreas Suter +// Date: 03/06/2009 +// Purpose: ROOT macro to read and plot Range data from trimsp calculation +// Assume following file Format: +// +// $Id$ +// +// DEPTH PARTICLES +// 15. 260 +// 45. 595 +// 75. 820 +// 105. 1179 +// +// plotRge(names), e.g. +// plotRge("InSne_E2500, InSne_E4000"); +// will read files + +void plotRge(TString &names) +{ + if (names.CompareTo("help", TString::kIgnoreCase) == 0) { + cout << endl << "usage: plotRge() or plotRge(\"help\")"; + cout << endl << " is a list of rge-files"; + cout << endl << endl; + return; + } + + TObjArray *tokens; + TObjString *ostr; + TString str; + char cstr[128]; + + Int_t i, j; + Int_t nStep = 0; + Int_t nStepmax = 0; + Double_t *depth; + Double_t *nStop; + Double_t *depthmax; + Double_t *nStopmax; + Double_t norm; + Double_t intNorm; + Double_t normStop[1000]; + Double_t normStopmax[1000]; + + TString pathname; + int sep; + TString path; + TString name,legtit; + + + + Int_t col; + Int_t color[1000]; + for (i=0; i<1000; i++) + color[i] = -1; + color[0] = TColor::kRed; + color[1] = TColor::kGreen; + color[2] = TColor::kBlue; + color[3] = TColor::kMagenta; + color[4] = TColor::kOrange; + color[5] = TColor::kViolet; + color[6] = TColor::kAzure+7; + color[7] = TColor::kOrange+4; + color[8] = TColor::kBlue-7; + + TGraph *rge[1000]; + + TMultiGraph *mg = new TMultiGraph(); + + TLegend *legend = new TLegend(0.7, 0.7, 0.95, 0.95); + legend->SetFillColor(TColor::GetColor(255,255,255)); // white + + tokens = names.Tokenize(" \t,;"); + + Double_t min = 0, max = 0, xmax = 0, xmin = 0; + Int_t imax; + + // Loop over file names + for (i=0; iGetEntries(); i++) { + ostr = dynamic_cast(tokens->At(i)); + str = ostr->GetString(); + cout << endl << i << ": read " << str.Data(); + + TGraph *fileGraph = new TGraph(str); + if ( fileGraph->IsZombie() ){ + cout << endl; + cout << "File " << str << " does not exist!!!" << endl << endl; + return; + } + + depth = fileGraph->GetX(); + nStop = fileGraph->GetY(); + nStep = fileGraph->GetN(); // Number of points in range + + // calculate step size in nm (convert from AA) + norm = (depth[1] - depth[0])/10; + + // intNorm is the total stopping particles + intNorm = 0.0; + for (j=0; j 0.) { + // devide original profile by (step size * total particles) in % + normStop[j] = 100*nStop[j]/(norm*intNorm); + } else { + normStop[j] = -1.; + } + // rescale depth to nm + depth[j] = depth[j]/10.; + } + + rge[i] = new TGraph(nStep, depth, normStop); + if (color[i] >= 0) { + rge[i]->SetMarkerColor(color[i]); + rge[i]->SetLineColor(color[i]); + } else { + TRandom *rand = new TRandom(i); + col = TColor::GetColor((Int_t)rand->Integer(255),(Int_t)rand->Integer(255),(Int_t)rand->Integer(255)); + rge[i]->SetMarkerColor(col); + rge[i]->SetLineColor(col); + delete rand; + } + rge[i]->SetMarkerStyle(20); + + mg->Add(rge[i]); + + ostr = dynamic_cast(tokens->At(i)); + str = ostr->GetString() + ", "; + sprintf(cstr, "%.1lf", ostr->GetString().Atof() /1000.0); + str += cstr; + + // remove path + sep = str.Last('/'); + path = str(0,sep); + name = str(sep+1,str.Length()-sep-1); + // remove comma etc. + sep = name.Last(','); + name = name(0,sep); + // remove extension etc. + sep = name.Last('.'); + name = name(0,sep); + // remove ????_ etc. + sep = name.Last('_'); + path = name(sep+1); + name = name(sep+2,name.Length()-sep-1); + legtit = ""; + legtit += path; + legtit += "="; + legtit += name; + legtit += " (eV)"; + + cout << endl << legtit << endl ; + rge[i]->SetTitle(str.Data()); + rge[i]->SetFillColor(TColor::kWhite); + legend->AddEntry(rge[i], legtit); + + delete fileGraph; + } + cout << endl; + + mg->Draw("APC"); + mg->GetXaxis()->SetTitle("Depth [nm]"); + mg->GetYaxis()->SetTitle("Normalized Stopping Profile [%/nm]"); + legend->Draw(); + + + delete tokens; + + // I am not sure what this does, but it waits until canvas is closed + c1->WaitPrimitive(" "); + cout << endl << "Canvas Closed" << endl ; + + // Then quit root cleanly + gApplication->Terminate(); + +} + diff --git a/trimsp/TrimSPGUI4/readAscii.C b/trimsp/TrimSPGUI4/readAscii.C new file mode 100644 index 0000000..0ce6359 --- /dev/null +++ b/trimsp/TrimSPGUI4/readAscii.C @@ -0,0 +1,88 @@ +// File: readAscii.C +// Author: Thomas Prokscha +// Date: 24/04/2005 +// Purpose: ROOT macro to read ASCII data from file FileName +// Assume sections +// Comment: +// and +// Data: +// label1 label2 ... +// value1 value2 ... +// + +// gROOT->Reset(); + +void readAscii(char *FileName, Int_t Col1, Int_t Col2) +{ + TObjString *ostr; + TString str,xlab,ylab; + + TString line, label, treeLabel; + TString rootFileName; + TObjArray *token; + TObjString *strtoken; + Int_t nPars = 0; + Int_t ntokens = 0; + Int_t i = 0; + Int_t nline=0; + Ssiz_t pos; + Double_t x[100],y[100]; + + FILE *fp = fopen(FileName,"r"); + if ( fp == NULL ){ + printf("File %s does not exist!\n", FileName); + return; + } + + while (line.Gets(fp)){ + if ( nline==0 ){ + // First line, get data labels + nline++; + token = line.Tokenize(" "); + ntokens = token->GetEntries(); + nPars=ntokens; + ostr = dynamic_cast(token->At(Col1)); + xlab = ostr->GetString(); + ostr = dynamic_cast(token->At(Col2)); + ylab = ostr->GetString(); + + } else { + token = line.Tokenize(" "); + ntokens = token->GetEntries(); +// if ( ntokens != nPars) { +// // We have a problems +// printf("The number of columns found is: %d not equal to %d\n",ntokens,nPars); +// } + + strtoken = (TObjString*) token->At(Col1); + label = strtoken->GetName(); + x[i] = label.Atof(); + strtoken = (TObjString*) token->At(Col2); + label = strtoken->GetName(); + y[i] = label.Atof(); + printf("(x,y)[%d]= (%f,%f)\n",i,x[i],y[i]); + + nline++; + i++; + } + } + + TGraph *gr = new TGraph(i-1,x,y); + TCanvas *c = new TCanvas("c",str); + gr->GetXaxis()->SetTitle(xlab); + gr->GetYaxis()->SetTitle(ylab); + gr->Draw("AC*"); + + c->Show(); + + + delete token; + + // I am not sure what this does, but it waits until canvas is closed + c->WaitPrimitive(" "); + cout << endl << "Canvas Closed" << endl ; + + // Then quit root cleanly + gApplication->Terminate(); +} +