text:
# Text Parser: Text to MySQL Database

Discussion in 'Mac Programming' started by barr08, Jul 26, 2007.

1. ### barr08 macrumors 65816

Joined:
Aug 9, 2006
Location:
Boston, MA
#1
Oh hey,

I need to parse text from a text file in this form:

06/07/07 02:44:29.966 INFO Servlet.Engine.Transports : 0 accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2

To be split accordingly:

06/07/07 / 02:44:29.966 / INFO /Servlet.Engine.Transports : 0 / accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2

Into a 5 column HTML table with the fields Date, Time, Level, ID, and Info. These columns are seperated above with the bold shashies.

Any ideas? PERL isn't neccesary, it is just what I was thinking of using. Even a start would be apprectiated, you don't need to give me a full working script or anything.

Thanks for looking!

2. ### ATG macrumors regular

Joined:
Aug 7, 2005
#2
Use regexes. AGRegex is the best I've found (and it has my initials )

EDIT: Oh, sorry, I didn't ask which language you are using :\

3. ### barr08 thread starter macrumors 65816

Joined:
Aug 9, 2006
Location:
Boston, MA
#3
I am trying to use PERL, but really at this point I would try anything. After I do this, my next step is to search these fields, so regexes will deffinitely be useful.

4. ### stndn macrumors member

Joined:
Oct 22, 2006
Location:
earth
#4
Here's something to get you started:

Code:
#!/usr/bin/perl -w

my $sampleText = "06/07/07 02:44:29.966 INFO Servlet.Engine.Transports : 0 accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2";$sampleText =~ m|^([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+(.+?)(accept.*)$|i; print "$1 / $2 /$3 / $4 /$5\n";

Not the prettiest sight and most likely unefficient, but at least it should give you some ideas.

-stndn.

5. ### barr08 thread starter macrumors 65816

Joined:
Aug 9, 2006
Location:
Boston, MA
#5
Thanks for the sample. I should probably admit I am a complete PERL noob, so how would I go by making this work. Do I just make a text file and ad ".pl" to the end of it? What program would I use to run the script?

If PERL isn't the best choice for this task, could someone reccomend a better language to do this in?

6. ### iBert macrumors regular

Joined:
Jul 14, 2004
#6
Perl is a pretty good scripting language specially for parsing text. At least in my opinion.

When are you going to need the parser to be called? Is it like a web service (just to say something) or are you manipulating something in C, C++, Java, etc and need to call this parser?

7. ### stndn macrumors member

Joined:
Oct 22, 2006
Location:
earth
#7
I thought you wanted to have something in Perl, and then I realized you mentioned that Perl is not necessary in your initial post ,p

iBert has the right questions, which I'm going to add to: Is this text parsing a one-time deal? Or are you going to run the script every time you want to show the output in other format?

If it's a one time deal, then you can take the Perl script as your base, make some changes, save it as filename.pl, and run the script through perl parser (one of which can be done from command line / terminal by typing: perl filename.pl).

If it's an ongoing parsing (done per request), maybe change it to something like PHP or whatnot. Not that Perl can't be used for web, but PHP can be mixed with HTML more easily / intuitively than Perl, which seems like what you're looking for (add HTML to the output).

-stndn.

8. ### barr08 thread starter macrumors 65816

Joined:
Aug 9, 2006
Location:
Boston, MA
#8
This will be ongoing, per user request, so maybe PHP would be better? I am thinking of parsing the data to a MySQl database, though I am not sure right now if my company supports it.

So should I ditch PERL and go with PHP? I do know that PHP and MySQL work well together (as far as I can remember)

9. ### pengu macrumors 6502a

Joined:
Mar 20, 2005
Location:
#9
PHP won't have an issue doing it (neither will Perl) but as stated, PHP is more aimed at mixing with/generating HTML.

You didn't really specify what parts (other than date/time) are likely to change? it APPEARS to be some kind of serverlog, relating to maybe Tomcat or BES or some other JSP/J2EE related server?

If you could give some examples of what other values you might get, we can probably help with a more accurate/specific/efficient method.

10. ### barr08 thread starter macrumors 65816

Joined:
Aug 9, 2006
Location:
Boston, MA
#10
Here is a chunk of a log file:

Code:
06/07/07 02:44:27.585 INFO Servlet.Engine.Transports : 0 Type: TEST
06/07/07 02:44:27.586 INFO Servlet.Engine.Transports : 0 Site User: QA_BPORTAL
06/07/07 02:44:27.586 INFO Servlet.Engine.Transports : 0 Product:ProductId: Broker Portal Name: Broker Portal
06/07/07 02:44:27.588 INFO Servlet.Engine.Transports : 0 Retrieving user ent list
06/07/07 02:44:27.619 INFO Servlet.Engine.Transports : 0 Retrieve ent names for user: 3771000016, contract: qa_bportal
06/07/07 02:44:28.064 INFO Servlet.Engine.Transports : 0 ibg.menu.db.UserEntListDBBuilder statistics:  proc = pk_portal.fn_get_ent_nm_by_usr_ent_typ( ?,?,?,?,? ) connMillis = 7 prepareMillis = 16 executeMillis = 75 processRowsMillis = 117 postProcessMillis = 0 subClassLogInfo =
06/07/07 02:44:28.067 INFO Servlet.Engine.Transports : 0 Linking site attributes
06/07/07 02:44:28.075 INFO Servlet.Engine.Transports : 0 Storing ent set for BROK back to user
06/07/07 02:44:28.832 INFO Servlet.Engine.Transports : 0 ibg.db.user.UserProductDBBuilder statistics:  proc = ESDBO.PK_PORTAL.FN_GET_USER_PRODUCT_INFO( ?,?,?,? ) connMillis = 7 prepareMillis = 1 executeMillis = 5 processRowsMillis = 1 postProcessMillis = 0 subClassLogInfo =
06/07/07 02:44:28.887 INFO Servlet.Engine.Transports : 0 ibg.db.user.UserCompCheckDBBuilder statistics:  proc = ESDBO.PK_ADMIN_USER.FN_CHECK_PARENT_COMPANY(?,?,?) connMillis = 4 prepareMillis = 1 executeMillis = 14 processRowsMillis = 0 postProcessMillis = 33 subClassLogInfo =
06/07/07 02:44:28.902 INFO Servlet.Engine.Transports : 0 ibg.db.user.UserCompCheckDBBuilder statistics:  proc = ESDBO.PK_ADMIN_USER.FN_CHECK_PARENT_COMPANY(?,?,?) connMillis = 6 prepareMillis = 1 executeMillis = 4 processRowsMillis = 0 postProcessMillis = 1 subClassLogInfo =
06/07/07 02:44:28.910 INFO Servlet.Engine.Transports : 0 POST /XML_IBGZP_A HTTP/1.1
06/07/07 02:44:28.911 INFO Servlet.Engine.Transports : 0 content-type: application/xml
06/07/07 02:44:28.911 INFO Servlet.Engine.Transports : 0 connection: keep-alive
06/07/07 02:44:28.912 INFO Servlet.Engine.Transports : 0 accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
06/07/07 02:44:28.912 INFO Servlet.Engine.Transports : 0 host: Unknown
06/07/07 02:44:28.913 INFO Servlet.Engine.Transports : 0 content-length: 302
06/07/07 02:44:28.913 INFO Servlet.Engine.Transports : 0 user-agent: HttpConnection
06/07/07 02:44:28.914 INFO Servlet.Engine.Transports : 0
06/07/07 02:44:28.915 INFO Servlet.Engine.Transports : 0 <?xml version="1.0" ?>
06/07/07 02:44:28.915 INFO Servlet.Engine.Transports : 0 <FBIBLV_REQUEST>
06/07/07 02:44:28.916 INFO Servlet.Engine.Transports : 0     <PSL_VIEW>FBIBLV.VIEW</PSL_VIEW>
06/07/07 02:44:28.917 INFO Servlet.Engine.Transports : 0     <FBIBLVI>
06/07/07 02:44:28.917 INFO Servlet.Engine.Transports : 0         <PRODUCT_ID>Z</PRODUCT_ID>
06/07/07 02:44:28.918 INFO Servlet.Engine.Transports : 0         <client_group_id>xxxxxxxxxx</client_group_id>
06/07/07 02:44:28.918 INFO Servlet.Engine.Transports : 0         <portal_id>xxxxxxxxxx</portal_id>
06/07/07 02:44:28.919 INFO Servlet.Engine.Transports : 0         <incl_rules_table>N</incl_rules_table>
06/07/07 02:44:28.920 INFO Servlet.Engine.Transports : 0     </FBIBLVI>
06/07/07 02:44:28.920 INFO Servlet.Engine.Transports : 0 </FBIBLV_REQUEST>

Basically this program I am writing is going to be a search. Each day, this log file will be parsed somewhere to a database, so a user can log on to a site, search via a field (such as date, time, etc.) and get a list of results. The database does not need to be viewable to the user, only their search results.

At this point, I am thinking of parsing with PHP, making a MySQL database to hold the data, and searching the database with PHP.

Any ideas, help, guidance, whatever is greatly appreciated.

Edit: If PHP and MySQL end up being the languages I use, I would need a testing server, right? I can't just test these scripts on my computer?

11. ### bobber205 macrumors 68020

Joined:
Nov 15, 2005
Location:
Oregon
#11
MySql and PHP can be installed locally. You can reach your server by going to locahost:80

I just checked my apps folder and I can't seem to find the app that does this server. Do a quick "PHP and MYSQL server for OS X" search on google.

EDIT: I tried that search and I can't find it. Damn.

12. ### barr08 thread starter macrumors 65816

Joined:
Aug 9, 2006
Location:
Boston, MA
#12
I am actually stuck at work on this XP box, which might make looking for something like that easier. I'll poke around google for something.
Does anyone know how I could do this on a windows machine? I am coming up short here.

13. ### macfaninpdx macrumors regular

Joined:
Mar 6, 2007
#13
You could either install them separately, by going to their respective sites (mySQL and PHP), or you could use packaged solution such as XAMPP, which will install Apache, MySQL, PHP & PEAR, and PERL along with several other useful utilities.

The advantage to installing them individually is that you only install the pieces you need. The advantage to using something like XAMPP is that it gives you administration utilities as well.

14. ### barr08 thread starter macrumors 65816

Joined:
Aug 9, 2006
Location:
Boston, MA
#14
Awesome, thanks. That program is exactly what I needed.

Now back to the original problem...

15. ### macfaninpdx macrumors regular

Joined:
Mar 6, 2007
#15
If you use PHP for you original question, you could try something like the following:
PHP:
 $logfile = file("\\path\\to\\your\\file"); foreach ($logfile AS $linenum =>$line) {     $logdate = substr ($line, 0, 8);     $logtime = substr ($line, 9, 12);     $level = substr ($line, 22, 4);     $id = substr ($line, 27, 29);     $info = rtrim (substr ($line, 57) ); }
Doing it this way (with substr) means that the date, time, level and id must be the same exact length every time, or it will break the line in the wrong spot. So a RegEx expression would definitely be more robust, but since I do not know regex expressions very well , this is another solution.

16. ### pengu macrumors 6502a

Joined:
Mar 20, 2005
Location:
#16
firstly. i suggest you install apache2, php5 and mysql5 seperately. there are very easy to follow tutorials, and you aren't likely to need to mess with them much once its set up.

as for the log. i'll have a look @ it tomorrow while im at work (its 1.30am here and wayyy too late to be thinking technically) and see if i can offer a basic solution for extracting/splitting the string values.

17. ### barr08 thread starter macrumors 65816

Joined:
Aug 9, 2006
Location:
Boston, MA
#17
I would do this, but getting programs installed on these work computers is a huge hassle. The all in one solution would be much easier and less time consuming to get installed on this box.

18. ### macfaninpdx macrumors regular

Joined:
Mar 6, 2007
#18
I just thought of one more solution to splitting the log file entries, although it still may not be as efficient as a properly written regex:
PHP:
 $logfile = file("\\path\\to\\your\\file"); foreach ($logfile AS $linenum =>$line) {      //explode line using space delimiter     list ($logdate,$logtime, $level,$id1, $id2,$id3, $info) = explode (" ", rtrim($line ), 7);     //combine id variables into one     $id = implode (" ", array ($id1, $id2,$id3) ); }
Since the explode function is using a space character to split the line, the ID field was split into three parts. I used the implode line to combine them again. Also, since there is a limit of 7 on the explode function, the remaining info in the INFO field will all be kept together (not separated).

19. ### barr08 thread starter macrumors 65816

Joined:
Aug 9, 2006
Location:
Boston, MA
#19
Thanks for these! I think I am going to try to use the second as a starting point for now. Unfortunately I can't test anything here at work because they have yet to supply me with a server or let me install any programs, and I can't access my school's testing servers because work blocks them.

20. ### stndn macrumors member

Joined:
Oct 22, 2006
Location:
earth
#20
I've just seen the sample log files you provided, and it's safe to say that the example code with regex won't work because I used the keyword 'accept' as one of the separators towards the end.

The key with text parsing is identifying consistent section(s) of the texts you are trying to parse.

From your example log, it's safe to assume that the part that will be consistent is the timestamp. It's not clear yet (to us) whether the texts 'INFO Servlet.Engine.Transports : 0' will always be there as well. If yes, then it can be used as separator if you are going through the regex way.

If you are using the substr () or explode () way per what's given by macfaninpdx, then you need to make sure that the texts and spacings are consistent among different parts of the log.

Otherwise, you might consider mixing regex and substr/explode as well.

-stndn.

21. ### barr08 thread starter macrumors 65816

Joined:
Aug 9, 2006
Location:
Boston, MA
#21
I don't know anything about regex, can you give an example?

22. ### krunk macrumors regular

Joined:
Jan 29, 2004
#22
Regex is extremely useful, but if your learning can be very time consuming ironing out the special cases and honing your regex.

If your doing this to learn how to process files, regex is a great thing to pick up toward that end. If your doing it out of some need and getting it done, done right, and done quickly is your primary concern. There are other methods with a lower learning curve...like below.

========================Ruby Code================
file = File.new('/path/to/file')
html = Fie.new('/path/to/html')

html.puts "
"
html.puts "
"
html.puts "DATE	"
html.puts "TIME	"
html.puts "LEVEL	"
html.puts "ID	"
html.puts "INFO	"
html.puts "
"

l = line.split # l => ["06/07/07", "02:44:29.966", "INFO", "Servlet.Engine.Transports", ":", "0", "accept:", "text/html,", "image/gif,", "image/jpeg,", "*;", "q=.2,", "*/*; q=.2"]

date = l[0]
time = l[1]
level = l[2]
id = l[3] << l[3] << l[4]
info = l[4..l.length]

html.puts "
"
html.puts "#{date}	"
html.puts "#{time}	"
html.puts "#{level}	"
html.puts "#{id}	"
html.puts "#{info}	"
html.puts "
"
end

html.puts "
"
html.close

==============================

That's ruby, the # beside the line.split is just a comment showing contents of the returned array. By default, split() separates a line by spaces into a new array.

23. ### barr08 thread starter macrumors 65816

Joined:
Aug 9, 2006
Location:
Boston, MA
#23
I am unclear on this also. Let me look into it and get back to you.

24. ### stndn macrumors member

Joined:
Oct 22, 2006
Location:
earth
#24
The first thing to note before using regex for anything is to make sure you can make a pattern out of what you are trying to process. Without a fixed pattern (regardless of how simple or complex it is), regex won't work. Actually, this is true for any form of (mostly text) parsing.

It's not an easy learning experience, but it's worth it if you have time. Otherwise, start with simple (temporary) solution using explode() or other methods.

-stndn.

25. ### barr08 thread starter macrumors 65816

Joined:
Aug 9, 2006
Location:
Boston, MA
#25
OK I looked into this further, the parts with a constant size include the date, time, and the "Servlet.Engine.Transports : ". The number after that can be anywhere from one to three digits. Every log file will have those three things being the same number of digits. Does that help at all?

I put another chunk for you to take a look at for easy reference.

Code:
06/07/07 02:44:27.585 INFO Servlet.Engine.Transports : 0 Type: TEST
06/07/07 02:44:27.586 INFO Servlet.Engine.Transports : 0 Site User: QA_BPORTAL
06/07/07 02:44:27.586 INFO Servlet.Engine.Transports : 0 Product:ProductId: Broker Portal Name: Broker Portal
06/07/07 02:44:27.588 INFO Servlet.Engine.Transports : 0 Retrieving user ent list
06/07/07 02:44:27.619 INFO Servlet.Engine.Transports : 0 Retrieve ent names for user: 3771000016, contract: qa_bportal
The red parts are of constant size, the size of the part in bold blue ranges largely, but is always the end of the string:

06/07/07 02:44:27.619 INFO Servlet.Engine.Transports : 0 Retrieve ent names for user: 3771000016, contract: qa_bportal


text:
# Science Practice Challenge Questions

### 6.1Energy and Metabolism

57.

Activation energy is required for a reaction to proceed, and it is lower if the reaction is catalyzed. Sucrose (table sugar) is a disaccharide. When we eat sucrose it is converted to carbon dioxide and water, as with other carbohydrates.

1. Identify if the breakdown of sucrose is endergonic or exergonic. Explain the reasoning for your identification.
2. Based on your identification, explain if cubes of sugar can be stored in a sugar bowl by creating a diagram similar to Figure 6.10.
3. If table sugar is placed in a spoon held over a high flame, the sugar is charred and becomes a blackened mixture composed primarily of carbon. Create a visual representation that includes a chemical equation to explain the role of the flame in this process.
4. In terms of your answers to questions 1-3, predict if sugar cubes in a bowl placed in a dish of water can be stored on a table, and justify your prediction.
5. [Extension] The energy of activation of a chemical reaction can be determined by measurement of the effect of temperature on reaction rate. The natural logarithm of the reaction rate constant is a linear function of the inverse of the temperature in Kelvin degrees. The negative of the slope of that graph is the energy of activation divided by the universal ideal gas constant, R = 8.314 J/Kmol. Using the following data (R. Wolfenden and Yang Yean, Journal of the American Chemical Society, 2008 Jun 18; 130(24): 7,548–7,549) evaluate the energy of activation of the following reaction.
Temperature (K) ln(rate)
440 -3.8
423 -4.5
403 -5
388 -6
Table 6.1

(a) Construct a graph of ln(rate) versus 1/T(K) and determine the energy of activation for the uncatalyzed reaction.

(b) Based on the data, explain the importance of enzymes for time scales characteristic of living systems on Earth—that is to say, life as we know it.

The time scale required for half of the molecules of initial sucrose to remain can be estimated. The relationship between the half-life and the activation energy is:

$t1/2=0.69×10EA/2.3RTt1/2=0.69×10EA/2.3RT$

At a temperature of 300K, approximately room temperature, RT is equal to 2,494 J/mole.

58.

Physical exercise involves both anabolic and catabolic processes. For each process, explain an expected outcome and describe an example of a specific exercise that can lead to the expected outcome.

### 6.2Potential, Kinetic, Free, and Activation Energy

59.

Explanations in science are often constructed by analogy. Explanations of the behavior of a poorly understood phenomenon can often be constructed by analogy to a phenomenon that is well understood. For each of the following cellular functions that require free energy, describe a parallel human activity and identify a source of free energy for that activity. For example, the synthesis of proteins can be expected to proceed as an assembly of a small set of sub-components, just as the construction of a building is accomplished by gathering and joining materials. It is consistent with our analogy to expect that there must be a free-energy resource that is consumed in the synthesis of proteins, just as hydrocarbon fuels are a source of energy for the construction of a building.

### 6.3The Laws of Thermodynamics

60.

Each process in Figure 6.8 shows examples of endergonic and exergonic processes.

1. For each process, identify if it is endergonic or exergonic, and provide reasoning for your identification that includes your definition of the system.
2. For each process, does entropy increase or decrease? Explain your reasoning in terms of changes in the amount of order within the system.
3. For each process, is there an input of energy? Explain your reasoning in terms of (a) the source of the energy input into the system and (b) the interaction between the system and its environment that provides that input of energy.
61.

Energy transfers occur constantly in daily activities. Think of two scenarios: cooking on a stove and driving a car. For each scenario, describe the system and explain how the second law of thermodynamics applies to the system in terms of energy input and change in entropy.

62.

Consider a simple process that illustrates the change in entropy when energy is transferred.

Take a block of ice as a system with a temperature of 0°C. This is water as a solid, so it has a high structural order. This means that the molecules are in a fixed position. As a result, the entropy of the system is low.

1. Allow the ice to melt at room temperature. Describe changes in the motion and interactions of water molecules before and after melting. Explain where the energy came from whose transfer produced melting. Predict the effect of the energy transfer on the entropy on the system, and justify your prediction.
2. Heat the water until the temperature reaches boiling point. Explain what happens to the entropy of the system when the water is heated.
3. Continue to heat the water at the constant temperature of the boiling point. Describe changes in the motion and interactions of water molecules before and after boiling. Predict the effect of the energy transfer on the entropy of the system, and justify your prediction.
4. [Extension/Connection] Molecules of water have simple responses to heating: The molecules move faster and interact less strongly with other neighboring molecules. Consider the primary producers of an aquatic ecosystem in summer. Describe the source of energy transfer to the system of photosynthetic plants and algae. Predict changes in the system in response. Explain what happens to the entropy of this trophic level when energy transfer occurs. Now consider the primary producers and their aqueous environment as the system. Explain what happens to the entropy of this system composed of photosynthetic organisms and their abiotic environment.
5. Predict the change in entropy of the system when both autotrophs and their abiotic environment are considered. Justify your prediction. Predict the signs of the entropy changes in both biotic and abiotic components of this system. Predict the relative magnitudes of these entropy changes, and justify your prediction.

63.

The sodium-potassium pump is an example of free-energy coupling. The free energy derived from exergonic ATP hydrolysis is used to pump sodium and potassium ions across the cell membrane. The hydrolysis of one ATP molecule releases 7.3 kcal/mol of free energy (ΔG = -7.3 kcal/mol). If it takes 2.1 kcal/mol of free energy to move one Na+ across the membrane (ΔG = +2.1 kcal/mol), how many sodium ions could be moved by the hydrolysis of one ATP molecule? Show your calculations to provide reasoning for your answer.

64.

Is the EA for ATP hydrolysis in cells likely relatively low or high compared to the EA for the combustion of gasoline in an internal combustion engine?

1. Explain your reasoning in terms of the relative stabilities of ATP and gasoline compared to air in which no catalysts are present.
2. Describe how the role of the enzyme ATPase in the hydrolysis of ATP in a cell differs from a spark in the cylinder of an internal combustion engine.
3. Describe a strategy for collecting data that can be used to measure the energies of activation (EA) of each of these two processes with instruments that can measure concentrations of reactions produced in each system.

### 6.5Enzymes

65.

Vitamin B12 is a co-enzyme involved in a wide variety of cellular processes. Synthesis of vitamin B12 occurs only in bacteria; in animals, these bacteria populate anaerobic environments in the gut. Consequently, vegan diets in developing nations and diets common to developing nations provide no source of B12. Researchers (Ghosh et al. http://dx.doi.org/10.3389/fnut.2016.00001]) found that rats whose diets contained limited (L) and no (N) B12 displayed symptoms that were not observed in the control group (C) whose diet included B12 and was otherwise identical. Chemical analysis of adipocytokines in the plasma after feeding periods of 4 and 12 weeks are shown in the following table.

Adipocytokines Tissue of origin Feeding duration (weeks) C L N
Leptin (pg/L) 4 5.7±0.21 5.8±0.25 6.1±0.25
MCP-1 (mg/L) 4 43.0±1.18 44.4±1.95 46.9±2.08
Monocytes 12 43.2±2.47 45.3±3.02 49.5±1.27
IL-6 (mg/L) 4 150±3.2 154±4.5 184±8.0
Monocytes 12 151±6.7 176±11.0 185±8.2
Table 6.2

The sample size for these data are small: n = 6, within each group. Also shown in the table are cells in which these cytokine messages originate. Adipose cells store fats. Monocytes are white blood cells of the immune system. Over the 12 weeks of feeding, the weights of all three groups were equivalent, while the percent of body fat increased relative to the control for the rats fed a diet of limited and no B12: 40% (N) and 20% (L), respectively.

1. Identify which adipocytokines show significant increases, relative to the control group, after only 4 weeks of treatment. Justify your identification.
2. Identify which adipocytokines show only significant increases, relative to the control group, after 12 weeks of treatment. Justify your identification.
3. Identify which adipocytokines show significant increases, relative to the control group, after 4 weeks of treatment but no further increase after 12 weeks. Justify your identification.

Adipocytokines are chemical messengers that regulate metabolism and blood vessel production and dilation. High concentrations of adipocytokines are commonly found among individuals with abnormal autoimmune response. Monocyte chemoattractant protein 1 (MCP-1) is involved in the trafficking or guiding of monocytes to damaged tissue, as in a wound. In mice, leptin receptors of cells in the hypothalamus suppress hunger. Interleukin (IL-6) is released to initiate and then regulate inflammation in response to an infection. The mice in this study were not infected or wounded.

1. Construct an explanation, with reasoning based on the evidence provided by these data, for the observed variations in adipocytokines.

Many noncommunicable diseases are associated with abnormal autoimmune responses, and the number of diseases that involve abnormal autoimmune response is increasing. Many autoimmune diseases, such as diabetes and heart disease, occur in developed nations at a much higher frequency than in developing nations.

1. Evaluate, based on these data concerning the effect of restrictions on the availability of B12, the following question: Does the increased lack of exposure to pathogens in developed nations lead to reduced or abnormal immune response?
66.

Using an example, explain how enzyme feedback inhibition regulation regulates a cellular process.

format: plain


text:
## Introduction

Deep-ultraviolet (DUV) photodetectors with an advantage of directly converting UV into an electrical signal have recently attracted much attention, which play a key role in the fields of UV imaging, secure communication, biological detection, military detection, etc1,2,3. Due to the outstanding characteristics of DUV photodetectors, such as high sensitivity, fast response speed, and low dark current4,5,6,7, various wide bandgap semiconductors (AlN, ZnO, GaN, and Ga2O3) have been expanded to DUV fields8,9,10,11. Typically, quasi-two-dimensional (2D) β-Ga2O3 is considered as an ideal candidate for DUV photodetector applications because of its suitable direct bandgap of ~4.90 eV, high breakdown electrical field of ~9 MV/cm, outstanding thermal stability, high adsorption coefficient, etc.12,13,14. However, the current high-performance β-Ga2O3-based UV photodetectors are usually fabricated on rigid substrates, which limit their applications in many novel device concepts such as transparent, wearable, and portable fields15.

It is no doubt that photodetectors based on flexible substrates could meet the growing demands of next-generation optoelectronics with low manufacturing cost, better portability, and light-weight design. Unfortunately, little attention of recent reports has been paid on the flexible β-Ga2O3 DUV photodetectors to date. Sooyeoun et al. fabricated β-Ga2O3 photodiode with graphene electrodes based on polyethylene terephthalate substrate, exhibiting a photo-to-dark current ratio (PDCR) of ~1 × 106% and a responsivity (R) of ~29.8 A/W16; Wang et al. reported flexible graphene/amorphous Ga2O3 van der Waals heterojunction with a PDCR of ~1 × 107% and a R of ~22.75 A/W17; etc. While the performances of the presented flexible β-Ga2O3 DUV photodiodes, especially in terms of R, are not competitive with their rigid devices18. Many strategies have been recently proposed to improve the performance of flexible β-Ga2O3 DUV photodetectors. On one hand, better than the reported photodiodes, the phototransistors, as one kind of three-terminal photodetectors, have showed a significant advantage of the intrinsic current modulation, high intrinsic gain, and low dark current, which have been considered as an alternative solution to further improve the performance of DUV photodetectors19. On the other hand, for the material itself, various affordable and high-quality growth techniques for β-Ga2O3 bulk single crystals have been developed, including edge-defined film-fed growth, the optical floating zone (OFZ), the Czochralski, and so on20.

Herein, the high-quality Ta-doped β-Ga2O3 single crystal has been grown by using an optimized OFZ method. Subsequently, a fully flexible high-performance β-Ga2O3 phototransistor on polyimide (PI) substrate was fabricated. The hexagonal boron nitride (h-BN) is selected as an ideal dielectric due to its large bandgap (5.97 eV), high breakdown field (8–12 MV/cm), atomically flat surface without unnecessary dangling bonds, and high thermal conductivity [1700–2000 W/(m K)]21,22,23. The obtained β-Ga2O3 phototransistor exhibits a high R of 1.32 × 106 A/W, a large detectivity (D*) of 5.68 × 1014 Jones, a great PDCR of 1.10 × 1010%, a high external quantum efficiency (EQE) of 6.60 × 108%, and an ultra-fast response time of ~3.5 ms. Then, the reliability and mechanical flexibility of the fabricated β-Ga2O3 phototransistor were explored. Besides, as a proof-of-concept, the flexible DUV detector arrays based on the present β-Ga2O3 phototransistors, combining with an artificial neural network (ANN), can perform image recognition efficiently and accurately. These results show that high-performance flexible DUV β-Ga2O3 phototransistors have great application potential in future wearable optoelectronics, UV imaging, and artificial intelligence fields.

## Results and discussion

### Material characterizations of Ta-doped β-Ga2O3

To determine the morphology and crystalline phase of the obtained Ta-doped β-Ga2O3 material, the high-resolution transmission electron microscopy (HR-TEM) measurement was conducted. The spacings of lattice fringe shown in Fig. 1a were calculated to be ~0.61 and ~0.58 nm for (200) and (001) atomic planes respectively, which agrees well with the results reported in the literature24. Notably, even with a suitable amount of Ta ion doping, there is almost no obvious lattice damage observed by the HR-TEM, indicating a good crystal quality of β-Ga2O3 material. The selected-area electron diffraction (SAED) pattern in the inset of Fig. 1a further confirms the perfect lattice symmetry and the lattice parameters of exfoliated β-Ga2O3 flakes. Synchrotron-based grazing incidence X-ray diffraction (GIXRD) measurement was used to analyze the fine crystalline structure of the β-Ga2O3 sample. The two-dimensional GIXRD (2D-GIXRD) pattern of Ta-doped β-Ga2O3 is presented in Fig. 1b, which displays the clear and bright diffraction rings. Figure 1c shows the corresponding azimuthally integrated one-dimensional GIXRD (1D-GIXRD) spectrum of Ta-doped β-Ga2O3, demonstrating the typical peaks of β-Ga2O3, which are well consistent with the standard JCPDF (41–1103)25. Notably, as shown in the inset figure, two diffraction peaks located at q ~21.12 nm−1 and 22.49 nm−1, which are assigned to be (400) and (002) planes, show an obvious split in peak shape and a significant increase in peak intensity, implying the Ta5+ doping could effectively occupy the ion vacancies (or substitute Ga3+) and thereby improve the crystalline of the parent β-Ga2O326. Then, the optical transmittance spectrum of Ta-doped β-Ga2O3 bulk single crystal is analyzed in Fig. 1d. In the visible light region of 400–650 nm wavelength, the transmittance value of the current β-Ga2O3 bulk single crystal is ~73%. The cutoff absorption edge is located at ~260 nm. The energy band gap (Eg) of Ta-doped β-Ga2O3 is also determined to be 4.71 eV from reflection electron energy loss spectroscopy (REELS) in the inset of Fig. 1d. Furthermore, the ultraviolet photoelectron spectroscopy (UPS) measurement was employed to investigate the energy level alignment of Ta-doped β-Ga2O3. As displayed in Fig. 1e, the corresponding work function and valence band maximum (EVBM) of the Ta-doped β-Ga2O3 are calculated to be 4.38 and 9.31 eV, respectively. Thus, the Fermi level (EF) of the Ta-doped β-Ga2O3 sample is located at −4.38 eV. The EVBM is located at 4.93 eV below the EF. Combined with the Eg measured from REELS spectrum (4.71 eV for the present Ta-doped β-Ga2O3), the band diagram of Ta-doped β-Ga2O3 is summarized in Fig. 1f. Obviously, the EF of Ta-doped β-Ga2O3 is above the conduction band minimum (ECBM) with 0.22 eV, which would greatly contribute to increase the electron concentration27.

### Interface and electrical properties of the β-Ga2O3 device

Next, a Ta-doped β-Ga2O3 metal insulator semiconductor field effect transistor (MISFET) with h-BN dielectric was fabricated. The β-Ga2O3 and h-BN flakes were mechanically exfoliated and sequentially transferred onto a SiO2/Si substrate. Firstly, the interface properties at Ta-doped β-Ga2O3/ h-BN heterostructure were investigated. Figure 2a shows the cross-sectional HR-TEM image of the stacked Ta-doped β-Ga2O3/h-BN heterostructure on the SiO2/Si substrate. No obvious deformation or fault was observed in each layer and the interface β-Ga2O3/h-BN heterostructure. And from Fig. 2a it can be seen the thickness of exfoliated β-Ga2O3 flake is 165 nm. The HR-TEM image of an enlarged area for the interface of Ta-doped β-Ga2O3/h-BN heterostructure is displayed in Fig. 2b. Note that, the highly crystalline nature of the β-Ga2O3 and h-BN and atomically sharp interface at β-Ga2O3/h-BN heterostructure are evident. In addition, high-magnification cross-sectional HR-TEM images of the h-BN flake and the interface of Ta-doped β-Ga2O3/h-BN heterostructure were shown in Fig. 2c. The displacements of h-BN were calculated to 3.4 Å, which is consistent with the value in the literature28. While the ordered lattice fringe formed at the β-Ga2O3/h-BN interface has a spacing of 4.0 Å, which is slightly larger than that in the bulk of h-BN, which might be attributed to the excessive residual stress at the interface of β-Ga2O3/h-BN29. The corresponding energy band diagram of Ta-doped β-Ga2O3/h-BN heterostructure was established in Supplementary Fig. 1. It can be clearly seen that the β-Ga2O3/h-BN heterostructure system has a staggered band alignment (type II)30. The valence and conduction band offsets (ΔEV and ΔEC) of Ta-doped β-Ga2O3/h-BN heterostructure are 3.42 and 4.68 eV, which could provide a high sufficient barrier height to reduce electron tunneling through the interface due to quantum tunneling effect or thermal fluctuations31. Subsequently, to broaden applications in the emerging area such as wearable and portable electronics and optoelectronics, a flexible β-Ga2O3 phototransistor with h-BN dielectric was fabricated on PI substrate. The PI film was chosen as a flexible substrate due to its capability of withstanding high temperatures up to 350 °C and other advantages such as light-weight, low-cost, soft, and flat surface32,33. The PI substrate used here was spin-coated and cured on the glass film, which corresponds to the optical image (Supplementary Fig. 2). It can be found that the PI film shows high flexibility and foldability. Next, the optical microscopy image of the fabricated β-Ga2O3 transistor is shown in Fig. 2d. The length (L) and width (W) of the β-Ga2O3 channel are ~2.6 and ~2.5 μm in sequence. The measured thicknesses of β-Ga2O3 channel layer and h-BN dielectric layer by atomic force microscope (AFM) are ~199.5 and ~11.3 nm (Supplementary Fig. 3), respectively. Then, the electrical properties of the fabricated flexible β-Ga2O3 transistor were measured and analyzed. Figure 2e displays the transfer curves of the fabricated β-Ga2O3 transistor in log and linear scales under dark condition at Vds = 1 V, which exhibits a high on/off current ratio (Ion/Ioff) of ~108 and a low off-state current (Ioff) of ~10 fA. The threshold voltage (Vth) is extracted as −8.30 V using a linear extrapolation method at Vds = 1 V. The transconductance (gm) as a function of Vg is extracted using $$g_{{{\mathrm{m}}}} = \frac{{\partial I_{{{{\mathrm{ds}}}}}}}{{\partial V_{{{\mathrm{g}}}}}}$$ (Supplementary Fig. 4)34. The maximum value of transconductance (gmax) can reach 0.49 μS at Vg = −6.65 V. The field-effect electron mobility (μfe) is also extracted using the equation of $$\mu _{{{{\mathrm{fe}}}}} = \frac{L}{{W \times C_{{{{\mathrm{ox}}}}} \times V_{{{{\mathrm{ds}}}}}}} \times g_{{{\mathrm{m}}}}$$, where L and W are the length and width of β-Ga2O3 channel, and Cox is the capacitance of gate dielectric per unit area34. Cox is calculated as 3.13 × 10−7 F/cm2, using the formula of $$C_{{{{\mathrm{ox}}}}} = \frac{{\varepsilon _0\varepsilon _{{{\mathrm{r}}}}}}{d}$$ where ε0 is the vacuum permittivity (8.854 × 10−12 F/m), εr is the relative permittivity of h-BN (~4), and d is the dielectric thickness (11.3 nm)34. And the peak value of μfe is calculated to be 1.6 cm2/V·s. Figure 2f shows the output characteristic of β-Ga2O3 transistor where Vg varies from −6 to 2 V with a step of 2 V. The sharp pinch-off and outstanding saturation of current can be clearly observed. These results show that β-Ga2O3 phototransistors have good gate tunability and electrical properties.

### The photoelectrical properties of the β-Ga2O3 device

Subsequently the photoelectrical properties of the fabricated β-Ga2O3 phototransistor were investigated systematically. In general, the photocurrent generation mechanisms are mainly categorized as photoconductive (PC) and photogating (PG) effects for 2D material phototransistors35. In the PC effect, the absorption of photons generates extra free carriers, increasing channel current, and thus the electrical resistance of channel was reduced (Supplementary Fig. 5). While PG effect is a particular example of the PC effect. If the photogenerated holes in n-type transistor are trapped in localized states of which energy near the valence band edge, they can perform as a local gate voltage (ΔVg), effectively modulating the electrical resistance of semiconductor channel (Supplementary Fig. 6)36. It is worth noting that the trapped photocarriers will prolong the lifetime of photogenerated carriers (τphotocarriers), usually leading to a large photoconductive gain (G)37, as detailed in Supplementary Section S1 and Eq. (S1).

To investigate the mechanism of photocurrent generation in β-Ga2O3 channel, we measured Ids-Vg characteristic under a series of illumination Pin at 250 nm excitation wavelength, as shown in Fig. 3a. The UV light source illuminates the surface of the device vertically and covers the entire channel. It is observed that the photocurrent (Iph) of device increases with increasing illumination densities. Then the curves of Iph as a function of Vg were plotted under different illumination Pin at Vds = 1 V in Fig. 3b. Obviously, Iph increases with the optical power. On one hand, this phenomenon is caused by the higher illumination Pin that can excite more photogenerated carriers, in turn, enhancing the PC effect. On the other hand, it is caused by trapping more photogenerated holes, increasing the PG effect mentioned above. But for a fixed power, the photocurrent accesses a maximum value. It is because that the effective modulation of Vg affects PC and PG effects38. Moreover, the generated Iph can be fitted successfully by the empirical Hornbeck-Haynes model (Supplementary Section S1 and Eq. (S2))39. The Pin dependence of Iph curve at a fixed gate voltage of −8 V is presented in Fig. 3c. The bule line is the fitting results according to Supplementary Equation S2, from which $$\eta \frac{{\tau _{{{{\mathrm{photocarriers}}}}}}}{{\tau _{{{{\mathrm{transit}}}}}}}$$ = 8606 and n = 0.79 have been deduced, where η is the efficiency of converting absorbed photons to electrons, τtransit is the transit time of carriers, and n is a phenomenological fitting parameter40. According to the equation of $$\tau _{{{{\mathrm{transit}}}}} = \frac{{L^2}}{{\mu _{{{{\mathrm{fe}}}}}V_{{{{\mathrm{ds}}}}}}}$$, τtransit is calculated to be 42 ns where L = 2.6 μm, Vds = 1 V, and μfe = 1.6 cm2/V·s. According to the transmittance spectrum in Fig. 1d, a reasonable absorption rate of 30% is assumed. Then the values of G and τphotocarriers can be derived to be about 2.8 × 104 and 1.2 ms, respectively. And the bandwidth of a photodetector without gain decay can be roughly defined as $$f_{3 - {{{\mathrm{dB}}}}} = \frac{1}{{2{{{\mathrm{\pi }}}}\tau _{{{{\mathrm{photocarriers}}}}}}}$$. Therefore, the 3-dB bandwidth of the β-Ga2O3 phototransistor is calculated to be ~133 Hz. It is clearly that a larger G will cause a smaller 3-dB bandwidth due to the competing relationship between them. Then, the typical signatures of PC and PG effects are illustrated in Supplementary Section 2. Then Iph-Pin curve at a fixed gate voltage of −8 V is extracted in Fig. 3d. The curve could be well fitted using the formula of Iph Pinα where α is exponent. The obtained value of α is 0.42 in Fig. 3d, smaller than 1, confirming the existence of PG effect in the β-Ga2O3 phototransistor41. Subsequently, the same method was used to extract α under a series of fixed gate voltages and the α-Vg curve was plotted in the inset of Fig. 3d. It reveals that α ranges from 0.71 to 0.1 when Vg changes from −9 to 0 V, indicating that the PG effect has a Vg-dependent relation which is consistent to Supplementary Equation S3. It is also observed that Vth of n-type β-Ga2O3 device shifted in negative direction from −7.50 to −14.50 V, which can be clearly interpreted by PG effect. The dependence of the change of threshold voltage $$\left( {\left| {\Delta V_{{{{\mathrm{th}}}}}} \right|} \right)$$ on Pin was also extracted and plotted in Supplementary Fig. 7. The Vth drifts negatively with increasing Pin. It can be assumed that the local gate electric field formed by trapped holes effectively changes the Fermi level and generates more electrons in β-Ga2O3 channel, causing a stronger PG effect.

The critical parameters including R, D*, PDCR, and EQE are extracted to further evaluate the performances of the fabricated β-Ga2O3 phototransistor42. The R of the β-Ga2O3 phototransistor is extracted firstly (Supplementary Fig. 8) from Fig. 3b using43

$$R = \frac{{I_{{{{\mathrm{ph}}}}}}}{{P_{{{{\mathrm{in}}}}} \times A}}$$
(1)

where A is the active area of the phototransistor. From Eq. (1), it can be found that the R and Iph meet the linear relationship under a fixed Pin. Therefore, the trend of IphVg and RVg curves is the same under a fixed power density. Then the maximum response (Rmax) was extracted from Supplementary Fig. 8 and plotted the corresponding Rmax - Pin curve in Fig. 3e. This result shows Rmax of the β-Ga2O3 phototransistor can reach 1.32 × 106 A/W at a low illumination density of 22 μW/cm2, which is much superior to previous reported β-Ga2O3-based photodetectors under similar power conditions7,44,45. It is also noteworthy that Rmax monotonically decreases with increasing illumination Pin. It is owing to the gradually filled trap states38, which is also related to the multi-faceted generation, separation, and transport processes of photogenerated carriers34. In addition, D* is another photodetector parameter which indicates the signal-to-noise ratio, shot current, considering the thermal, generation-recombination, and background radiations46. Assuming that the shot noise caused by dark current (Idark) is the main noise source of total noise, D* can be given by47

$$D^ \ast = \frac{{RA^{0.5}}}{{(2eI_{{{{\mathrm{dark}}}}})^{0.5}}}$$
(2)

where e is the electron charge (~1.6 × 10−19 C), as displayed in Fig. 3e. It can be seen that the D* reaches the maximum value of 5.68 × 1014 Jones at the illumination Pin of 22 μW/cm2 and maintains the same order of 1014 when a series of power changes, which is comparable to previous reported β-Ga2O3 photodetectors46,48,49. While this method neglected 1/f noise which predominates in the MISFET-based phototransistors50. In order to comprehensively evaluate D*, the low frequency noise measurement is also conducted to extract the D* which was defined as $$D^ \ast = R \times \frac{{\sqrt {AB} }}{{i_{{{\mathrm{N}}}}}} = R \times \frac{{\sqrt A }}{{S_{{{\mathrm{n}}}}}}$$, where R is responsivity, A is the active area of the phototransistor in a unit of cm2, B is the bandwidth, iN is the measured noise current of the phototransistor, and Sn is the noise current density51. The Supplementary Fig. 9a shows that the noise power spectral density for Vg = −8.45, −8.00, −7.60, and −7.35 V, respectively. The Supplementary Fig. 9b shows the noise current density extracted from the Supplementary Fig. 9a at the noise frequency of 100, 101, 102, and 103 Hz. It can be found that Sn increases when the Vg increases under a fixed noise frequency condition. As shown in Supplementary Fig. 10, the extracted D* is 6.55 × 1013 Jones for Vg = −8.45 V under illumination Pin of 22 μW/cm2 condition, which is lower 100 times than that extracted directly using the Idark method (8.65 × 1015 Jones). Note that, this value of 6.55 × 1013 Jones is still very competitive with the reported literature46,48,49. Then, another photodetector parameter, PDCR is given by50

$${\rm{PDCR}} = \frac{{I_{{{{\mathrm{ph}}}}}}}{{I_{{{{\mathrm{dark}}}}}}} \times 100{{{\mathrm{\% }}}}$$
(3)

which is used to evaluate the rejection ability for noise. Obviously, the PDCR exhibits an increasing trend with Pin, as shown in Fig. 3f. In order to eliminate the influence of gate voltage on PDCR, we discussed the PDCR characteristic of the device at Vg = −10 V. The dark current at Vg = −10 V is about 3.18 × 10−8 μA and the Iph under different Pin conditions at Vg = −10 V has been shown in Fig. 3d. The PDCR can reach 5.96 × 109% under 22 μW/cm−2 and increase to 1.10 × 1010% under 207 μW/cm−2. Finally, EQE means the ratio of the number of converting absorbed photons to electrons and the total number of excitation photons, which is extracted from the equation

$${\rm{EQE}} = \left( {\frac{{Rhv}}{e}} \right) \times 100{{{\mathrm{\% }}}}$$
(4)

where h is Planck’s constant (6.626 × 10−34 J s) and υ (=c/λ) is the frequency of incident light48. The EQE of the device decreases gradually with increasing Pin as shown in Fig. 3f. The largest EQE reaches 6.60 × 108% under 22 μW/cm2 of Pin. These results indicate that the obtained β-Ga2O3 phototransistors have outstanding photoelectrical properties.

### The time response and stability properties of the device

To further study the photoresponse properties of the β-Ga2O3 phototransistor, time-dependent measurements on the device under various conditions were conducted. Figure 4a shows the time-dependent properties of the β-Ga2O3 phototransistor under different excitation wavelength. The measurement was carried out at Vg = −8 V and Vds = 1 V with the Pin density of 75 μW/cm2. Then, the rejection ratio is calculated as the ratio of R under 250 nm and visible (410, 532, and 650 nm) light illumination in Fig. 4a. The parameter can show the ratio of single and specific background radiation noise under illumination conditions47. Very clearly, there is almost no photocurrent generation under 410, 532, and 650 nm light exposure. The current of the device is ~1.40 × 10−7 μA under the three visible light illumination while the current of the device is ~2.40 μA under 250 nm light illumination. The rejection ratio of β-Ga2O3 phototransistor between 250 nm/visible light could reach 1.71 × 107, which exhibits high spectral selectivity. It can be confirmed that the obtained β-Ga2O3 phototransistor is much more sensitive to DUV light than the visible and near-IR lights. Besides, from Fig. 4a, a quick rise of Iph as soon as the 250 nm laser is turned on followed by a rapid drop back to initial values when the 250 nm laser is turned off under the chopping effect of the chopper. This implies that the β-Ga2O3 phototransistor can act as a sensitive UV-light-activated switch. To evaluate the repeatability and stability of the device’s optical response characteristic under the excitation of 250 nm laser, time dependence Iph curve was measured for several cycles in Fig. 4b. The illumination light is turned on and off at an interval of 10 s with a period of 20 s. It can be found that the ON-OFF switching behavior can be retained well. To obtain the rise time (τr) and decay time (τd), Fig. 4c shows the enlarged view of the rise and decay edges of the curve in Fig. 4b. The observed switching duration for τr or τd is calculated only to be 3.5 ms, which is much faster than the reported values of other UV photodetectors52,53. While according to the above statement, the response time of device can be further improved if the photogating effect is reduced because there exists a compromise between them. Supplementary Table 1 provides a summary and comparison of key parameters for the reported UV photodetectors based on various materials. By contrast, the maximum R of β-Ga2O3 phototransistor (1.32 × 106 A/W) fabricated in this work is 100 times more sensitive than the traditional material photodetectors (such as GaN (104 A/W), SiC (0.18 A/W), ZnO (12 A/W), and others)54,55,56,57,58,59. In addition, the R of β-Ga2O3 phototransistor is also improved by more than 100 times than the reported the perovskite-based UV photodetectors (BiOBr (1.27 × 104 A/W), Ga2ln4S9 (104 A/W), Sr2Nb3O10 (1.20 × 103), and others)3,60,61,62. Besides, Supplementary Table 2 summaries the photoresponse properties of the fabricated β-Ga2O3 phototransistor and compares some previous works on β-Ga2O3-based photodetectors. These results clearly reveal that the DUV β-Ga2O3 phototransistor fabricated in this work exhibits superior photoelectric performance, outperforming most reported UV photodetectors. The large responsivity stems from a strong PG effect on the β-Ga2O3 channel induced by the localized states in the β-Ga2O3 layer6. Finally, the reliability test of the β-Ga2O3 phototransistor on a flexible PI substrate was carried out. Figure 4d shows the operating platform in the experiment. We bent the device to 60°, 30°, and 0°, respectively. The transfer curves of the device after folding 103 times were shown in Fig. 4e. It is clear that the flexible β-Ga2O3 phototransistor exhibits negligible performance loss. In Fig. 4f, no performance deterioration can be observed even if the device was folded for 104 times at a bending angle of ~0°. It is believed that the proposed flexible β-Ga2O3 phototransistor has great potential in flexible UV image sensing applications due to the outstanding photosensitivity, flexibility, and stability.

### An artificial neural network based on the β-Ga2O3 device

In recent years, the intelligent industry represented by robotics has been so flourishing that researchers are looking forward to developing human-like bionic robots11,63. What’s more, it also hoped that the detection range of the eyes of the bionic robot could exceed that of humans. High-performance flexible UV image sensors based on the fabricated β-Ga2O3 device make it possible for the robot’s UV vision function. To this end, a UV detector array and an ANN are designed to artificially simulate the human vision system, as illustrated in Fig. 5a. The UV detector array composed of 15 × 15 pixels is designed to perceive the image. Images of the letters F, D, and U in Fig. 5b form a database used by artificial neural visual system. Obviously, images of letters formed by UV detector arrays show high contrast because the phototransistors based on β-Ga2O3 can produce a large Iph under DUV light illumination, which makes it easier for robots to recognize and remember them. It is noted that all image signals were normalized. More detailed information is described in Supplementary Note 1. Next, a three-layer ANN was developed for training and recognizing the perceived images. As displayed in Fig. 5c, the three-layer ANN consists of input layer (225 neurons), hidden layer (128 neurons), and output layer (3 neurons). The image-recognition rate of UV detector array is illustrated in Fig. 5d. After 64 training epochs, the corresponding recognition rate could reach 0.99, which shows high image recognition efficiency. To further verify the high image recognition rate of the trained ANN, 90 image examples from above image database, including 30 “F” images, 30 “D” images, 30 “U” images, were chosen to input into the trained ANN. Then the probability for three possibility results was calculated and plotted in Fig. 5e. The results show the trained ANN has great recognition capability. As a result, the flexible UV detector array based on high-performance β-Ga2O3 phototransistors has a promising application in UV photosensitive imaging.

In summary, high performance and flexible DUV Ta-doped β-Ga2O3 phototransistor with the h-BN dielectric has been fabricated on PI substrate. The obtained Ta-doped β-Ga2O3 phototransistor exhibits a high R of 1.32 × 106 A/W, a large D* of 5.68 × 1014 Jones, a great PDCR of 1.10 × 1010%, a high EQE of 6.60 × 108%, and a fast response time of ~3.5 ms. Moreover, the flexible Ta-doped β-Ga2O3 device displays high reliability and mechanical flexibility that can sustain well up to 104 bending cycles. Furthermore, the flexible DUV detector arrays based on high-performance Ta-doped β-Ga2O3 phototransistors, combined with an artificial neural network, can perform image recognition efficiently and accurately. These results show high performance flexible UV Ta-doped β-Ga2O3 phototransistors have great potential for applications in future wearable optoelectronics, UV imaging, and artificial intelligence fields.

## Methods

### Fabrication of the flexible β-Ga2O3 transistor

Ta-doped β-Ga2O3 single crystal was grown by the OFZ technique. First, the β-Ga2O3 (6 N) and Ta2O5 (4 N) powders are mixed fully by the wet ball milling and pressed into a rod by a cold isostatic press. Next, the rod was sintered in air at 1450 °C for 20 h, using <010> oriented crystal as the seed. Finally, the crystal growth starts. The obtained crystals are intact with uniform color. The schematic diagram of the fabrication method of Ta-doped β-Ga2O3 is illustrated in Supplementary Fig. 11.

In this study, the 0.05 mol % Ta-doped β-Ga2O3 singe crystal was chosen due to its suitable active carrier concentration of 1.4 × 1018 cm−3. The fabrication of the flexible β-Ga2O3 phototransistor began by cleaning a glass substrate with isopropyl alcohol, acetone, and DI water, followed by dehydration with a nitrogen spray gun. After that, the soluble PI was deposited by spin-coating at 3000 r/min on the glass substrate and prebaked at 80 °C on a hot plate for 8 min to remove the organic solvent. Then the PI film was fully cured at 280 °C under ambient condition for 60 min. We spin-coated the soluble PI onto the glass substrate, overcoming the problem of plastic shrinkage with the high temperature processes. Next, the mechanically exfoliated β-Ga2O3 flake from the β-Ga2O3 bulk single crystal (the Raman spectrum of β-Ga2O3 flake is displayed in Supplementary Fig. 12) was dry-transferred to the as-fabricated PI substrate. Subsequently, Ti/Al/Ni/Au (20/100/60/80 nm) stack electrodes were deposited as source and drain contract pads via a standard electron-beam lithography, metallization, and lift-off process. The device was then annealed at 350 °C in a high-vacuum furnace with a high pure N2 ambient for 3 h to improve ohmic contacts. Subsequently, the h-BN flake was also obtained by using the mechanical exfoliation method from a BN bulk single crystal (SixCarbon Technology Supplies) and subsequently transferred precisely onto the top of the pre-deposited β-Ga2O3 channel as the gate dielectric utilizing a poly (dimethylsiloxane) transfer method. Finally, the top-gate electrode of Ti/Au (10/70 nm) was patterned and deposited.

### Microscopic and electrical characterizations

The active area of the phototransistor was measured to be ~2.6 × 2.5 μm2 in sequence, which was characterized by the high-precision optical microscope equipment (Olympus BX53M). The high-resolution structural analysis of samples including β-Ga2O3 flakes, h-BN flakes, and the interface of β-Ga2O3/h-BN heterostructure was characterized using HR-TEM (Talos F200X). The morphology and thicknesses of β-Ga2O3 channel and h-BN flakes were measured by AFM (Bruker Dimension Icon). The crystalline structure of β-Ga2O3 samples was investigated by GIXRD which uses X-ray with a wavelength of 0.6887 Å. 2D-GIXRD pattern was obtained by a PILATUS detector at a distance of about 263 mm from the sample, and an exposure time of ~20 s. The optical transmittance characterization of β-Ga2O3 samples was investigated by UV-visible spectrophotometer (UV-3100). The UPS spectrum was acquired using a SPECS PHOIBOS 100 hemispherical analyzer, which was excited by an unfiltered He I (21.20 eV) gas discharge lamp. The electrical and optoelectronic properties of the β-Ga2O3 photodetector were measured with a semiconductor analyzer (Agilent B1500A). The UV source was provided by a deuterium lamp (THORLABS SLS204). Deuterium lamp irradiates directly the device surface through the optical fiber. The optical fiber illuminates the surface of the device vertically and covers the entire β-Ga2O3 channel. The response time was measured by using a chopper (C-995). The calibration of the incident power density is used by an optical power meter (THORLABS S120VC).


text:
# Smallest number with in a larger number with a certain length

I have a number with $n$ digits. I want to keep only $m$ digits out of it. What is the smallest possible $m$ digit number which can be generated from the larger number so that order of digits is retained.

Ex: 3422509739

I need the smallest 3 digit number by removing 7 digits with order retained which will be 039.

This problem is very similar to subsequence problem that is solved using dynamic programming. So, there are several ways to solve this problem, but the algorithm that you choose really depends on the input size ($n$, $m$ and base of numbers).
Algorithm SmallestSubNumber(number[1:n], m)


text:
Error Analysis¶

Introduction¶

In physics courses, we spend most of our time getting “the answer” - solving equations we know for a final result (numerical or symbolic). This is great on paper, but when it comes to experiments, we always have sources of error. Instrumentation can only provide results with a certain precision (roughly, how close together measurements are) and accuracy (roughly, how close the result is to reality), and as such, any time we run an experiment in the lab (or even when running simulations), we need to report the error in our measurement.

Often, we will run an experiment many times given the same setup (even if we are trying several variants, we’ll run each several times), then report the mean of our measurements

$\mu=\langle{x}\rangle=\sum_{i=1}^Nx_i/N$

along with the standard deviation

$\sigma=\sqrt{\frac{\sum_{i=1}^N(x_i-\mu)^2}{N-1}}$

The $$N-1$$ is not for the true (population) standard deviation, but is a statistical correction based on taking a sample from a population (otherwise we would use $$N$$). For more, peruse chapter 4 of Dawson Baker’s “Physics Skill Manual” available here.

$$\sigma$$ is also known as the root-mean-square (take the square root of the squared distance from the mean), and can alternatively be defined by:

$\begin{split}\sigma=\sqrt{\langle(x-\langle{x}\rangle)^2\rangle}&= \sqrt{\langle{x^2}-2x\langle{x}\rangle+\langle{x}\rangle^2\rangle}\\ &=\sqrt{\langle{x^2}\rangle-2\langle{x}\rangle\langle{x}\rangle+\langle{x}\rangle^2}\\ &=\sqrt{\langle{x^2}\rangle-\langle{x}\rangle^2}\end{split}$

This is well and good for quantities we measure directly. But what about if we then compute other quantities from those measurements? We need to be able to report our uncertainty in those values as well (for an example, see below). But how do we do that?

Single Variable Functions¶

Let’s first look at the simple case: a function of one variable, say $$f(x)$$. If we have all the values of $$x$$, we can compute $$\langle f\rangle$$ simply:

$\langle f \rangle=\sum_{i=1}^Nf(x_i)$

We can even compute $$\sigma_f$$:

$\begin{split}\langle f^2\rangle=\sum_{i=1}^Nf^2(x_i)\\ \sigma_f^2=\langle f^2\rangle-\langle f\rangle^2\end{split}$

But, if we don’t have the particular values of $$x$$ and instead only have $$\mu_x,~\sigma_x$$, we will need to make some approximations to find $$\mu_f,~\sigma_f$$. Let’s do a Taylor approximation of $$f(x)$$ around $$\mu_x=\mu$$:

$\begin{split}f(x)&\approx f(\mu)+\left.\frac{df}{dx}\right|_{\mu}(x-\mu)+\frac{1}{2!}\left.\frac{d^2f}{dx^2}\right|_{\mu}(x-\mu)^2\\ \langle f \rangle=\mu_f&\approx f(\mu)+\left.\frac{df}{dx}\right|_{\mu}\langle x-\mu\rangle+ \frac{1}{2!}\left.\frac{d^2f}{dx^2}\right|_{\mu}\langle(x-\mu)^2\rangle\\ &=f(\mu)+\frac{1}{2!}\left.\frac{d^2f}{dx^2}\right|_{\mu}\langle(x-\mu)^2\rangle\\ &=f(\mu)+\frac{1}{2!}\left.\frac{d^2f}{dx^2}\right|_{\mu}\sigma_x^2\end{split}$

since $$\langle x-\mu\rangle=\langle x\rangle-\mu=0$$.

Keeping the second order approximation in $$x-\mu$$, we get:

$\begin{split}f^2(x)&\approx f^2(\mu)+2f(\mu)\left.\frac{df}{dx}\right|_{\mu}(x-\mu)+2f(\mu) \left.\frac{d^2f}{dx^2}\right|_\mu\frac{(x-\mu)^2}{2!}+ \left(\frac{df}{dx}\middle|_\mu\right)^2(x-\mu)^2\\ \langle f^2\rangle&\approx f^2(\mu)+2f(\mu) \left.\frac{d^2f}{dx^2}\right|_\mu\frac{\langle(x-\mu)^2\rangle}{2!}+ \left(\frac{df}{dx}\middle|_\mu\right)^2\langle(x-\mu)^2\rangle\\ \sigma_f^2&=\langle f^2\rangle-\langle f\rangle^2=\left(\frac{df}{dx}\middle|_\mu\right)^2\sigma_x^2\end{split}$

Thus, we have the following description of the distribution of values for $$f$$:

$\begin{split}\mu_f&=f(\mu_x)+\frac{1}{2!}\left.\frac{d^2f}{dx^2}\right|_{\mu_x}\sigma_x^2\\ \sigma_f^2&=\left(\frac{df}{dx}\middle|_{\mu_x}\right)^2\sigma_x^2\end{split}$

Multivariate Functions¶

Let’s say that we have some function $$f$$ over N independent variables $$x_1,~x_2,~...,~x_N$$ that is the quantity we want to compute. To compute the mean and standard deviation, we can use the same techniques above to arrive at:

$\begin{split}\langle{f}\rangle&=f(\overline{\mu})+ \sum_{i=1}^N\frac{1}{2!}\left. \frac{d^2f}{dx_i^2}\right|_{\overline{\mu}}\sigma_i^2\end{split}$

Where $$\overline{\mu}$$ represents the average of each variable applied as an averaged vector (just shorthand). But what about the uncertainty? For that, if we can assume that the variables are independent of one another, we can use the following equation:

$\sigma_f^2=\sum_{i=1}^N \sigma_{x_i}^2\left(\frac{\partial f}{\partial i}\middle|_{ \overline{\mu}}\right)^2$

This says that we add the variances (square of the standard deviation) of each variable, multiplied by the square of the partial derivative of the function with respect to that variable, applying the average values of all variables as necessary.

If the variables are not independent, then we have to include the covariance $$\sigma_{x,y}=\langle xy\rangle-\langle x\rangle\langle y\rangle$$ (so the variance is $$\sigma_{x,x}=\sigma_x^2$$). But that topic is outside the scope of this course.

Example: Watermelon Drop¶

Here at the Physics Department of the University of Texas at Austin, we often drop watermelons from the physics, math, and astronomy building (Robert Lee Moore Hall), as it extends 61.5 meters above the ground. When we drop the watermelons, we often time the descent to approximate $$g$$, the acceleration due to gravity. To do this, we first assume that the only massive sobjects are the watermelon and the Earth, so that we can just have the single force of Earth’s gravity acting on the watermelon (in practice, other sources are indeed negligible). Since the watermelon will not be relativistic, we can just use Newtonian gravity:

$\overrightarrow{F}=-G\frac{M_E M_w}{r^2}\hat{r}=M_w \overrightarrow{a_w}$

or,

$|a_w|=G\frac{M_E}{r^2}$

where $$r$$ changes by 61.5m relative to Earth’s radius of ~6371km. With such a small change, we can take a first-order approximation, centered at 6371km:

$|a_w(r)|\approx9.810\frac{m}{s^2}-3.080\times10^{-6}\frac{1}{s^2}(r-6371000m)$

And if we take the difference in $$|a_w|$$ between $$r=6371061.5m$$ and $$r=6371000m$$, we get a difference of $$-0.00019\frac{m}{s^2}$$, which is totally negligible relative to the first term, so we can assume that the acceleration is constant over the course of the fall (note: we cheated here a bit by plugging in the known values for the mass and radius of earth, but only to show that the acceleration due to gravity can be considered constant, making the standard approximation in nearly every introductory physics course).

With our acceleration being constant, we can easily integrate over time twice to get that

$y(t)=y_0+v_0t-\frac{1}{2}gt^2$

where away from Earth’s surface is considered positive and $$g$$ is the acceleration due to gravity. We further will state that the initial velocity of the watermelon is 0, and the height is 61.5m. So, now we have that $$y(t)=61.5-.5gt^2$$.

So if we have some set of times for when $$y=0$$ (i.e., the watermelon explodes on impact with the ground), we can easily rearrange this to solve for $$g$$

$g_{obs}(t)=\frac{123m}{t^2}$

So, our data is just time but we want to get acceleration due to gravity. Let’s say we had the times here.

The average of these values is $$\langle{t}\rangle=3.48s$$, and the unbiased estimator for standard deviation (computed with the $$N-1$$ correction, as above) is $$\sigma_t=0.058s$$. We have that

$\begin{split}g=\frac{123m}{(3.48s)^2}=10.16\frac{m}{s^2}\\ \frac{\partial g}{\partial t}=-\frac{246m}{t^3}\end{split}$

So we have

$\left.\frac{\partial g}{\partial t}\middle|_{\langle{t}\rangle}\right.=-5.78\frac{m}{s^3}$

and

$\begin{split}\sigma_g&=\sqrt{\sigma_t^2\left(\frac{\partial g}{\partial t} \middle|_{\langle{t}\rangle}\right)^2}\\ &=\sqrt{(0.058s)^2\left(-5.78\frac{m}{s^3}\right)^2}=0.11\frac{m}{s^2}\end{split}$

So, we can report our result for $$g$$ in the compact form: $$10.16\pm0.11 \frac{m}{s^2}$$, which says that the mean is 10.16 m/s^2 and the standard deviation is 0.11 m/s^2. This seems pretty close to the correct answer of $$g=9.8 \frac{m}{s^2}$$, but we are ~3.3 standard deviations from it! For most of science, 3 standard deviations is considered to be significantly different ( 99.73% of results should be within 3 standard deviations) [discovery of new particles such as the Higgs boson usually requires 5 standard deviations!]. But why should our result be different? Have we found that we’ve been measuring gravity incorrectly lo these many years? Or is something else at work?

Thus brings up the discussion of sources of error. One is that we neglected air resistance in the calculation above. It’s reasonable that the watermelon was nearing terminal velocity by the time it hit the ground, which means that the descent should have taken a little longer (we assumed constant acceleration, but near the end, it begins traveling at constant velocity). But if we corrected for this, since it took longer than our model predicts, $$g_{obs}$$ should have been smaller than $$g$$! So although that is a source of error, it’s not one that explains the error we observed. What does explain the error is much less interesting - that we used humans to time the descent, and even with a countdown to the drop, there will always be a slighly delayed reaction in timing the drop. As such, with even a tenth of a second delay (giving $$\langle{t}\rangle=3.38s$$), $$g_{obs}$$ is now less than $$g$$. If we could quantify our delay, we could correct for it, then continue to determine where we went wrong. If the reaction time puts us under, then what happens if we take the more complicated model where we have constant force of gravity, but an air resistance dependent on velocity (or velocity squared)? Can we make further corrections to our model to attain a better and better result? Often, the answer is yes, but we may not always have the data to do so. For example, we would need to characterize the air drag and quantify the reaction delay, which is data we just don’t have (not difficult to get, but not collected).


text:
# Augmentum broken in Lilypond Vaticana notation

While transcribing Vexilla regis I came across a weird issue with augmenta being offset to the right.

``````\version "2.19.81"
\include "gregorian.ly"

cantus = \relative c' {
\[ \augmentum g \melisma \flexa \augmentum f \melismaEnd \] \divisioMaior
f \[ g( \pes a ) \]
}

cantusLyrics = \lyricmode { tor sus -- pen }

\score { \new VaticanaVoice = "cantus" \cantus \addlyrics \cantusLyrics }
``````

The augmenta from the first ligature are almost hidden by the last ligature.

When I leave the last ligature off, the augmenta are rendered correctly:

What's causing this and how can I fix it? Is there an error somewhere that I'm not seeing?

• I'm afraid I can't help, but I can confirm the same problem with LilyPond 2.18.2. I did have to use the following score block though: `\score { << \new VaticanaVoice << \clef "vaticana-fa1" \music >> >> }` This appears to be a similar problem to the one described in this mailing list post and in this thread, with a possible workaround described. – Greg Feb 16 '18 at 18:44

I got the same problem and did some research. It looks like that it appears only at a `divisio`. In some archive of the lilypond mailing list, I found the solution.
If you add two `s8` notes here, each `augmentum` will be rendered correctly:
``````\relative c' {  \[ \augmentum g \melisma \flexa \augmentum f \melismaEnd \]%


text:
# High-speed Infrared UART link with photodiode

I need short-distance (about few centimeters) wireless IR UART link with 250k+ baud. I tried to use phototransistor (assume Q1 is phototransistor). Q3 is used to prevent inverting signal.

simulate this circuit – Schematic created using CircuitLab

With this schematic I reach 57600 baud with Arduino. Now I am looking for photodiode schematic and I hope that it can be faster.

I found out tipical application with transimpedance amplifier. Something like this:

simulate this circuit

Is this suitable for my application? What about environment light adjustment? Also, can I use this circuit with unipolar supply?

Maybe comparator will be more suitable for my application, because I need only binary signal and don't care about amplifier linearity etc, but I have no idea how to use comparator instead of op-amp in this chematics.

UPD #1:

1. I replace R1 with 100 Ohm and reach 115200 kbit/s
2. I know about IrDA, but environment light isn't a really big problem in my case. I can protect optocoupler from environment light.

It is a bit more challenging. You need to protect your channel from variations in ambient light, which can be horrendous. That's why IrDA (infrared digital communication alliance) uses modulated light and a sophisticated automatic gain control system. Current IrDA standard extends the data rate to 4 Mbps, see the article.

The IrDA standard has successfully progressed from IrDA-1.0 (115.2Kbps) to IrDA-1.1 (4Mbps) in the short two and half years. There are many components, adapters, software and mobile systems available for the IrDA-1.0 standard on the market now. The same will happen soon for IrDA-1.1 standard with the optoelectronic, analog and digital interface ASIC components already on the market.

Today at IrDA 1.4 there are "medium" IR (MIR) transeivers (1.152 mbps) TFDU5307, FIR (fast infrared 4 Mbps) transceivers like TFDU6300 which are still available.

There were plans for VFIR (16 Mpps channels), but it looks like this direction didn't get enough industrial traction. VFIR transceiver TFDU8108 is however available.

• Important to note that these modules receive the IRDA pulses, but do not encode/decode the data to uart - that took a separate chip. You could use bit padding as I describe below, and some mcu eg PIC have modulation hardware that can connect internally to the uart and make/decode IR pulses – Henry Crun Aug 16 '18 at 3:27
• @HenryCrun, sorry, it was long time ago when I was dealing with IrDA, forgot a lot of things. They are using a kind of pulse-position-modulation, see vishay.com/docs/82513/physical.pdf – Ale..chenski Aug 16 '18 at 3:35
• For application and top-stack details this note from Agilent might be useful, farnell.com/datasheets/306539.pdf – Ale..chenski Aug 16 '18 at 3:39

No not really, phototransistors are very slow, not enough gain, not ac coupled, LM358's are far too slow etc etc.

Perhaps look at IRDA modules (have photodiode and amplifiers built in) and chips.

IRDA uses a pulse encoding scheme, not simply putting uart data into the LED.

This LT1328 data sheet gives you a good idea of how the coding works.

It also notes that you can put raw uart NRZ through, for shorter distances with poorer interference immunity.

The fundamental issue is that you need lots of edges, and when your uart is sending 00 or FF, there aren't enough. You can improve on this by not using all 8 data bits, but having one or more padding bits inside the byte to increase the number of edges.

For example you can send 4 data bits per uart byte with each being a 1/0 pair So to send a 1 you use 10 and to send a 0 you use 01 Thus 1010 is expanded to uart signal 0(startbit) 10 01 10 01 1(stopbit)

If you do this the signal will go happily through AC coupled amplifiers and data slices as it has lots of edges, and equal numbers of 1s and 0s (DC balance), and you can probably use it directly from the IRDA RX into the uart, without the encoder/decoder.

You might even get something as crude as this to work over short ranges, using 74hcu04 or 74hc04.

simulate this circuit – Schematic created using CircuitLab

Comments on values of R1,R4 welcome, I haven't thought too much about it.

Note that when there is no signal expect digital noise. Also notice lots of power supply filtering - it is absolutely needed.

• @ Henry The IRDA standard requires the system to work with IR currents out of the photodiode from 100 nanoAmp to 100 microAmp.(from what I remember). – analogsystemsrf Aug 16 '18 at 5:24
• @analogsystemsrf OPs req is not actually IRDA, just the modules offer an integrated rx. "few centimeters wireless IR UART link with 250k+ baud" – Henry Crun Aug 16 '18 at 5:27


text:
# Good 'ol Algebra

Level pending

Let:

$$x^{3}-y^{2}=z^{5}$$,

$$x+z=y$$

Where $$x$$, $$y$$ and $$z$$ are all positive integers less than 19. Find $$x+y+z$$.

×


text:
# Transfer Function Representing Thrusters

Hi all,

I’m designing PID controllers of my own that drive the BlueROV2. Is there a transfer function, like \frac{K(s+8)}{(s+3)(s+6)(s+10)} available that I can use to represent the dynamics of the thrusters? It’s okay if there isn’t. I’ll just do a trial and error procedure with finding the best gains.

Thank you!

-Cameron

We don’t have one documented for a single thruster, because ArduSub doesn’t account for thruster properties in its vehicle control, just their direction components. The control space is over the full vehicle angles (ATC_ANG_* params) and rates (ATC_RAT_* params) - there’s some more detail in the ArduCopter Attitude Control docs.

If it’s relevant, I did a couple of forum searches and came up with the following posts, which may be useful:

By the way, I edited your example transfer function to be rendered as maths. There are instructions for how to do that in the Formatting a Post/Comment section of the “How to Use the Blue Robotics Forum” pinned post

1 Like

Thank you Eliot! Those posts are very useful in helping me with my thesis and designing my PID controller. I made the mistake of saying PID controllers because I’m only designing one.

1 Like


text:
• ### $^{22}$Ne and $^{23}$Na ejecta from intermediate-mass stars: The impact of the new LUNA rate for $^{22}$Ne(p,$\gamma$)$^{23}$Na(1611.07742)

Nov. 23, 2016 astro-ph.SR
We investigate the impact of the new LUNA rate for the nuclear reaction $^{22}$Ne$(p,\gamma)^{23}$Na on the chemical ejecta of intermediate-mass stars, with particular focus on the thermally-pulsing asymptotic giant branch (TP-AGB) stars that experience hot-bottom burning. To this aim we use the PARSEC and COLIBRI codes to compute the complete evolution, from the pre-main sequence up to the termination of the TP-AGB phase, of a set of stellar models with initial masses in the range $3.0\,M_{\odot} - 6.0\,M_{\odot}$, and metallicities $Z_{\rm i}=0.0005$, $Z_{\rm i}=0.006$, and $Z_{\rm i} = 0.014$. We find that the new LUNA measures have much reduced the nuclear uncertainties of the $^{22}$Ne and $^{23}$Na AGB ejecta, which drop from factors of $\simeq 10$ to only a factor of few for the lowest metallicity models. Relying on the most recent estimations for the destruction rate of $^{23}$Na, the uncertainties that still affect the $^{22}$Ne and $^{23}$Na AGB ejecta are mainly dominated by evolutionary aspects (efficiency of mass-loss, third dredge-up, convection). Finally, we discuss how the LUNA results impact on the hypothesis that invokes massive AGB stars as the main agents of the observed O-Na anti-correlation in Galactic globular clusters. We derive quantitative indications on the efficiencies of key physical processes (mass loss, third dredge-up, sodium destruction) in order to simultaneously reproduce both the Na-rich, O-poor extreme of the anti-correlation, and the observational constraints on the CNO abundance. Results for the corresponding chemical ejecta are made publicly available.
• ### Searching for a quantum critical point in YbCu5-xAux(1403.6004)

March 24, 2014 cond-mat.str-el
Structural, magnetic, transport and thermal properties of YbCu5-xAux alloys with Au concentration between the limit of structural stability of AuBe5 type at x = 0.4 up to x = 0.7 are reported. The outstanding features of this system are: i) the constant and record high values of Cm /T 7J/molK^2 below a characteristic temperature T*, ranging between 150 mK and 350 mK. ii) A power law thermal dependence dependence Cm/T(T>T*)=A/T^q, with q = 1.3 +/- 0.1, and iii) an arising incoherent electronic scattering observed in the resistivity at T < 1K for x < 0.6 despite the fact that Yb magnetic atoms are placed in a lattice. Magnetic frustration, originated in the tetrahedral distribution of Yb atoms, appears as the responsible of the exotic behavior of this system.
• ### Josephson effect and tunneling spectroscopy in Nb/Al2O3/Al/MgB2 thin films junctions(cond-mat/0108212)

We report the demonstration of dc and ac Josephson effects as well as tunneling spectroscopy measurements on Nb/Al2O3/Al/MgB2 thin films heterostructures. Data on dc Josephson effect suggest the presence of two characteristic critical currents possibly accounted for the presence of two gaps in the MgB2 film. Tunneling spectroscopy measurements confirm this two-gap scenario and are explained with the presence of tunneling from both dirty limit and clean limit regions, reflecting two different order parameter amplitudes. The behavior of these two gaps is found in good agreement with the predictions of a recently proposed multigap theory.
• ### Strong coupling theory for driven tunneling and vibrational relaxation(quant-ph/9912024)

Aug. 9, 2000 quant-ph
We investigate on a unified basis tunneling and vibrational relaxation in driven dissipative multistable systems described by their N lowest lying unperturbed levels. By use of the discrete variable representation we derive a set of coupled non-Markovian master equations. We present analytical treatments that describe the dynamics in the regime of strong system-bath coupling. Our findings are corroborated by ab-initio'' real-time path integral calculations.


text:
# Multibody Mechanics/Euler Parameters

Euler parameters (also known as Euler-Rodrigues parameters or unit quaternions) are an alternative to Euler angles as a means to describe the relative orientation of reference frames in three dimensions.

The significant difference between Euler parameters and Euler angles is that where there are only three Euler angles, there are four Euler parameters. The Euler parameters are not independent, and a valid set of parameters must satisfy the constraint that the sum of their squares is constant.

The Euler parameters are defined by an axis and angle, i.e. the relative orientation of frames is described by a rotation about a common axis. If the axis defined by the vector $\vec{u}$ decomposed as $u_1,u_2,u_2$ in both frames (the axis is common), and the rotation by an angle $\phi$ (right-handed about the vector) to arrive at orientation of the second frame, then the Euler parameters are

$e_0=\cos\left(\frac{\phi}{2}\right)|\vec{u}|$

$e_i=\sin\left(\frac{\phi}{2}\right)u_i, i=1...3$

Note that it is common for one to consider Euler parameters in normalized form where the vector $\vec{u}$ is a unit vector $\hat{u}$, in which case the Euler parameters will, by definition, satisfy the constraint that their squares sum to one.


text:
# Two Circles Touching Externally

To understand the concept of two given circles that are touching  each other externally, look at this example.

Consider the given circles

${x^2} + {y^2} + 2x – 2y – 7 = 0\,\,\,{\text{ – – – }}\left( {\text{i}} \right)$ and ${x^2} + {y^2} – 6x + 4y + 9 = 0\,\,\,{\text{ – – – }}\left( {{\text{ii}}} \right)$

Let ${C_1}$ and ${r_1}$ be the center and radius of the circle (i) respectively. Now to find the center and radius compare the equation of a circle with the general equation of a circle ${x^2} + {y^2} + 2gx + 2fy + c = 0$.

To get the center and radius, we have

Center ${C_1}\left( { – g, – f} \right) = {C_1}\left( { – 1, – \left( { – 1} \right)} \right) = {C_1}\left( { – 1,1} \right)$
Radius ${r_1} = \sqrt {{g^2} + {f^2} – c} = \sqrt {{{\left( 1 \right)}^2} + {{\left( { – 1} \right)}^2} – \left( { – 7} \right)} = \sqrt {1 + 1 + 7} = \sqrt 9 = 3$

Let ${C_2}$ and ${r_2}$ be the center and radius of the circle (ii) respectively, Now to find the center and radius compare the equation of a circle with the general equation of a circle ${x^2} + {y^2} + 2gx + 2fy + c = 0$.

To get the center and radius, we have

Center ${C_2}\left( { – g, – f} \right) = {C_2}\left( { – \left( { – 3} \right), – 2} \right) = {C_2}\left( {3, – 2} \right)$
Radius ${r_2} = \sqrt {{g^2} + {f^2} – c} = \sqrt {{{\left( { – 3} \right)}^2} + {{\left( 2 \right)}^2} – 9} = \sqrt {9 + 4 – 9} = \sqrt 4 = 2$

First we find the distance between the centers of the given circles by using the distance formula from the analytic geometry, and we have

$\left| {{C_1}{C_2}} \right| = \sqrt {{{\left( {3 – \left( { – 1} \right)} \right)}^2} + {{\left( { – 2 – 1} \right)}^2}} = \sqrt {{{\left( {3 + 1} \right)}^2} + {{\left( { – 3} \right)}^2}} = \sqrt {16 + 9} = \sqrt {25} = 5$

Now adding the radius of both the given circles, we have

${r_1} + {r_2} = 3 + 2 = 5$

This shows that the distance between the centers of the given circles is equal to the sum of their radii. This is only possible if the circles touche each other externally, as shown in the figure.


text:
×

# Shin's Useless Theorem

$$\frac{c\sin{A}}{\sin{C}} = \frac{\left(b-c\right)\left(\cos{B}-\cos{C}\right)}{\cos{\left(2B\right)}-\cos{\left(B-C\right)}}$$

Note by Tristan Shin
3 years, 2 months ago

## Comments

Sort by:

Top Newest

Can you please post a proof? · 1 year, 1 month ago

Log in to reply

Hmm this was 2 years ago so I don't quite recall my proof. If I rediscover it I'll share it here.

Also to note: that was when I was in 7th grade and prone to errors, so there is a high chance the property is not true :P · 1 year, 1 month ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...