From Hot Tapir, 1 Year ago, written in R.
Embed
  1. setwd("/home/santiago/G_scripts_2/")
  2. rm(list = ls())
  3. system("rm *.pdf")
  4. system("rm *.out")
  5. require("lomb")
  6. library("lomb")
  7. p_ini <-0.1
  8. p_fin <- 0.95
  9. stdtol <- 4
  10. tol <- 15 # [arcsec]
  11. conv1 <- paste("rm -r phase")
  12. system(conv1)
  13. conv11 <- paste("mkdir phase")
  14. system(conv11)
  15. conv2 <- paste("sh ./convertidor.sh")
  16. system(conv2)
  17. stilts <- "/usr/bin/java -jar /home/santiago/.stilts/stilts.jar"
  18. input = "~/home/santiago/G_scripts_2/CCASAS.txt"
  19. star <- read.table("CCASAS.txt")[, c(1)]
  20. run1 <- paste("curl \"http://www.astrouw.edu.pl/cgi-asas/asas_cgi_get_data?", star, ",asas3\" > asas.", star, ".out", sep = "")
  21. run2 <- paste("awk \' { print $1,$2 }\' asas.",star,".out | grep -v \"#\" > asas.",star,".clean.out",sep = "")
  22. arch <- paste("asas.",star, ".clean.out", sep = "")
  23. for (i in 1:length(run1)) {
  24.   system(run1[i])
  25.   system(run2[i])
  26. }
  27. limp <- paste("sh ./limpiador.sh")
  28. system(limp)
  29. for (i in 1:length(star)) {
  30.   file <- paste("asas.", star[i], ".clean.out", sep = "")
  31.   serie <- read.table(file)[, c(1, 2)]
  32.   mp <- mean(serie[[2]])
  33.   stdm <- sd(serie[[2]])
  34.   serie <- subset(serie, serie[[1]] > 2400 & abs(serie[[2]]) < stdtol*sdtm)
  35.   t <- serie[[1]]
  36.   m <- serie[[2]]
  37.   plotpdf <- paste("asas.", star[i], ".clean.pdf", sep = "")
  38.   pdf(file = plotpdf,  paper = "special", width = 10, height = 8, bg = "white")
  39.   print(paste("Full Ligthcurve: ASAS", star[i]))
  40.   plot(t, m, ylim = rev(range(m)), main = paste("Full Ligthcurve: ASAS", star[i]))
  41.   dev.off()
  42.   plotpdf <- paste("asas.", star[i], ".period.pdf", sep = "")
  43.   pdf(file = plotpdf,  paper = "special",  width = 10,height = 8,  bg = "white" )
  44.   lspjuan <- lsp( serie,from = p_ini,  to = p_fin,  type = "period",  ofac = 15,  alpha = 0.01,plot = TRUE )
  45.   pps <-  summary(lspjuan)
  46.   dev.off()
  47.   Estrella <- read.table(arch[i], quote = "\"", comment.char = "")
  48.   pps [10, 1]
  49.   Periodo <- pps [10, 1]
  50.   Periodo <- as.numeric(as.character(pps [10, 1]))
  51.  
  52.   Mag <- (m)
  53.   HJD1 <- (t) + 2450000
  54.   epoch = min(HJD1)
  55.   tiempo <- (HJD1 - epoch) / Periodo
  56.  
  57.   phase <- tiempo - floor(tiempo)
  58.   plotpdf <- paste("asas.", star[i], ".phase.pdf", sep = "")
  59.   pdf(file = plotpdf, paper = "special",width = 10, height = 8, bg = "white")
  60.   print(paste("Phase Ligthcurve: ASAS", star[i]))
  61.   plot(phase, Mag, type = "p", ylim = rev(range(Mag)), main = paste("Phase Ligthcurve: ASAS", star[i]))
  62.   mtext(paste("Period = ", Periodo, " d"), side=3)
  63.   dev.off()
  64.  
  65. }
  66.  
  67. conv4 <- paste("convert *clean.pdf all_curves.pdf")
  68. system(conv4)
  69. conv5 <- paste("convert *phase.pdf all_phases.pdf")
  70. system(conv5)
  71. conv6 <- paste("pdftk A=all_curves.pdf B=all_phases.pdf shuffle A B output final.pdf")
  72. system(conv6)
  73. conv3 <- paste("mv *phase.pdf phase")
  74. system(conv3)
  75.  

captcha

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: codemirror_modes

Filename: view/view_footer.php

Line Number: 6

Backtrace:

File: /var/www/html/pastebin/htdocs/themes/stikkedizr/views/view/view_footer.php
Line: 6
Function: _error_handler

File: /var/www/html/pastebin/htdocs/application/core/MY_Loader.php
Line: 173
Function: include

File: /var/www/html/pastebin/htdocs/application/core/MY_Loader.php
Line: 44
Function: _ci_load

File: /var/www/html/pastebin/htdocs/themes/stikkedizr/views/view/view.php
Line: 114
Function: view

File: /var/www/html/pastebin/htdocs/application/core/MY_Loader.php
Line: 173
Function: include

File: /var/www/html/pastebin/htdocs/application/core/MY_Loader.php
Line: 44
Function: _ci_load

File: /var/www/html/pastebin/htdocs/application/controllers/Main.php
Line: 663
Function: view

File: /var/www/html/pastebin/htdocs/index.php
Line: 315
Function: require_once